From 52a1a6e60b418f9f0bcca9b12ef631f6f8176786 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') 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) { -- cgit v1.2.3