diff options
author | D G Turner | 2012-08-02 12:41:40 +0100 |
---|---|---|
committer | D G Turner | 2012-08-02 13:00:28 +0100 |
commit | 95ba78c27d3a757f3153ff0bf60884ad0735d82b (patch) | |
tree | 70f4cf4eac6543065c16b121b3eb15c42fb9386b | |
parent | 5c03af4a7647be6d185ed5fdaea7df7fc52b1420 (diff) | |
download | scummvm-rg350-95ba78c27d3a757f3153ff0bf60884ad0735d82b.tar.gz scummvm-rg350-95ba78c27d3a757f3153ff0bf60884ad0735d82b.tar.bz2 scummvm-rg350-95ba78c27d3a757f3153ff0bf60884ad0735d82b.zip |
TEENAGENT: Fix for bug #3428161 "PSP: No music in TeenAgent".
This could occur on other platforms too and was a race hazard between
mixer thread startup and music being valid i.e. If the music doesn't
already exist, when the mixer callback is done, this deletes the channel
as idle. Reordered the calls to fix this.
Also, removed unecessary music->start() as this is done by setMusic(n)
on successful load anyway.
-rw-r--r-- | engines/teenagent/teenagent.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp index d09ecff442..f1276e3a62 100644 --- a/engines/teenagent/teenagent.cpp +++ b/engines/teenagent/teenagent.cpp @@ -544,9 +544,8 @@ Common::Error TeenAgentEngine::run() { syncSoundSettings(); - _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, music, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false); setMusic(1); - music->start(); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, music, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false); int load_slot = ConfMan.getInt("save_slot"); if (load_slot >= 0) { |