mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 07:53:12 +00:00
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.
This commit is contained in:
parent
259f262592
commit
52a1a6e60b
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user