diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/groovie/music.cpp | 10 | ||||
-rw-r--r-- | engines/groovie/music.h | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp index 79b7fe1300..7195198a6c 100644 --- a/engines/groovie/music.cpp +++ b/engines/groovie/music.cpp @@ -777,11 +777,14 @@ void MusicPlayerMPEG4::updateVolume() { _vm->_system->getMixer()->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, _userVolume * _gameVolume / 100); } -bool MusicPlayerMPEG4::load(uint32 fileref, bool loop) { - // Stop any old sound +void MusicPlayerMPEG4::unload() { + MusicPlayer::unload(); + _vm->_system->getMixer()->stopHandle(_handle); +} - // Find the filename +bool MusicPlayerMPEG4::load(uint32 fileref, bool loop) { + // Find correct filename ResInfo info; _vm->_resMan->getResInfo(fileref, info); uint len = info.filename.size(); @@ -804,7 +807,6 @@ bool MusicPlayerMPEG4::load(uint32 fileref, bool loop) { Audio::AudioStream *audStream = Audio::makeQuickTimeStream(info.filename); if (!audStream) { - // MPEG-4 sounds aren't handled yet, so nothing should play here yet warning("Could not play MPEG-4 sound '%s'", info.filename.c_str()); return false; } diff --git a/engines/groovie/music.h b/engines/groovie/music.h index 2b91cb11eb..cdf67cab44 100644 --- a/engines/groovie/music.h +++ b/engines/groovie/music.h @@ -173,6 +173,7 @@ public: protected: void updateVolume(); bool load(uint32 fileref, bool loop); + void unload(); private: Audio::SoundHandle _handle; |