From 95ba78c27d3a757f3153ff0bf60884ad0735d82b Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 2 Aug 2012 12:41:40 +0100 Subject: 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. --- engines/teenagent/teenagent.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engines/teenagent/teenagent.cpp') 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) { -- cgit v1.2.3