diff options
Diffstat (limited to 'engines/groovie/music.cpp')
-rw-r--r-- | engines/groovie/music.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp index c00290b155..cf65e012c8 100644 --- a/engines/groovie/music.cpp +++ b/engines/groovie/music.cpp @@ -934,16 +934,18 @@ bool MusicPlayerIOS::load(uint32 fileref, bool loop) { } // Create the audio stream - Audio::AudioStream *audStream = Audio::SeekableAudioStream::openStreamFile(info.filename); + Audio::SeekableAudioStream *seekStream = Audio::SeekableAudioStream::openStreamFile(info.filename); - if (!audStream) { + if (!seekStream) { warning("Could not play audio file '%s'", info.filename.c_str()); return false; } + Audio::AudioStream *audStream = seekStream; + // Loop if requested if (loop) - audStream = Audio::makeLoopingAudioStream((Audio::RewindableAudioStream *)audStream, 0); + audStream = Audio::makeLoopingAudioStream(seekStream, 0); // MIDI player handles volume reset on load, IOS player doesn't - force update here updateVolume(); |