diff options
author | Filippos Karapetis | 2009-12-27 23:46:11 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-12-27 23:46:11 +0000 |
commit | 5adb6277eb3bf0badd6d2403177ce4411c89ee13 (patch) | |
tree | aca71e4840b58b4f368b9539708e735356ca263f /engines/sci/engine | |
parent | fedd4f10768771556c74ef24eacd31654b55af78 (diff) | |
download | scummvm-rg350-5adb6277eb3bf0badd6d2403177ce4411c89ee13.tar.gz scummvm-rg350-5adb6277eb3bf0badd6d2403177ce4411c89ee13.tar.bz2 scummvm-rg350-5adb6277eb3bf0badd6d2403177ce4411c89ee13.zip |
SCI/new music code:
- Switched to Common::StackLock for mutexes
- Renamed Music::stopAll() -> Music::clearPlayList()
- Implemented a better Music::stopAll method, which stops all sounds with proper signals, instead of destroying them
- Renamed the SCI0 command cmdGetPlayNext -> cmdStopAllSounds and implemented it
svn-id: r46665
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/game.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/savegame.cpp | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp index d6b4c9cdb7..633d01f7f4 100644 --- a/engines/sci/engine/game.cpp +++ b/engines/sci/engine/game.cpp @@ -441,7 +441,7 @@ int game_exit(EngineState *s) { game_init_sound(s, SFX_STATE_FLAG_NOSOUND, s->detectDoSoundType()); #else s->_audio->stopAllAudio(); - s->_soundCmd->_music->stopAll(); + s->_soundCmd->_music->clearPlayList(); #endif } diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 7c0b33a6d6..7677157f48 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -619,7 +619,7 @@ static void sync_songlib(Common::Serializer &s, SongLibrary &obj) { void SciMusic::saveLoadWithSerializer(Common::Serializer &s) { // Sync song lib data. When loading, the actual song lib will be initialized // afterwards in gamestate_restore() - _mutex.lock(); + Common::StackLock lock(_mutex); int songcount = 0; byte masterVolume = soundGetMasterVolume(); @@ -645,7 +645,7 @@ void SciMusic::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsUint32LE(songcount); if (s.isLoading()) { - stopAll(); + clearPlayList(); for (int i = 0; i < songcount; i++) { MusicEntry *curSong = new MusicEntry(); @@ -657,8 +657,6 @@ void SciMusic::saveLoadWithSerializer(Common::Serializer &s) { syncSong(s, _playList[i]); } } - - _mutex.unlock(); } #endif |