aboutsummaryrefslogtreecommitdiff
path: root/engines/teenagent
diff options
context:
space:
mode:
authorD G Turner2012-08-02 12:41:40 +0100
committerD G Turner2012-08-02 12:41:40 +0100
commit52a1a6e60b418f9f0bcca9b12ef631f6f8176786 (patch)
treed2c5566fb0c176e59f1c5c05c2fe303672b9c279 /engines/teenagent
parent259f262592bab9b779bad7aff6752ca69ffb26de (diff)
downloadscummvm-rg350-52a1a6e60b418f9f0bcca9b12ef631f6f8176786.tar.gz
scummvm-rg350-52a1a6e60b418f9f0bcca9b12ef631f6f8176786.tar.bz2
scummvm-rg350-52a1a6e60b418f9f0bcca9b12ef631f6f8176786.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.
Diffstat (limited to 'engines/teenagent')
-rw-r--r--engines/teenagent/teenagent.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp
index f06de6f803..57c069fe59 100644
--- a/engines/teenagent/teenagent.cpp
+++ b/engines/teenagent/teenagent.cpp
@@ -535,9 +535,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 = Common::ConfigManager::instance().getInt("save_slot");
if (load_slot >= 0) {