SCI: dont seek during init of music but on play, fixes assert when restoring saves caused by r49905 - because channel remapping isn't done at that point

svn-id: r49907
This commit is contained in:
Martin Kiewitz 2010-06-16 21:23:47 +00:00
parent 02c3397ddf
commit 289b668099

View File

@ -224,8 +224,6 @@ void SciMusic::soundInitSnd(MusicEntry *pSnd) {
channelFilterMask = pSnd->soundRes->getChannelFilterMask(_pMidiDrv->getPlayId(), _pMidiDrv->hasRhythmChannel()); channelFilterMask = pSnd->soundRes->getChannelFilterMask(_pMidiDrv->getPlayId(), _pMidiDrv->hasRhythmChannel());
pSnd->pMidiParser->loadMusic(track, pSnd, channelFilterMask, _soundVersion); pSnd->pMidiParser->loadMusic(track, pSnd, channelFilterMask, _soundVersion);
// Fast forward to the last position and perform associated events when loading
pSnd->pMidiParser->jumpToTick(pSnd->ticker, true);
_mutex.unlock(); _mutex.unlock();
} }
} }
@ -316,6 +314,9 @@ void SciMusic::soundPlay(MusicEntry *pSnd) {
pSnd->pMidiParser->setVolume(pSnd->volume); pSnd->pMidiParser->setVolume(pSnd->volume);
if (pSnd->status == kSoundStopped) if (pSnd->status == kSoundStopped)
pSnd->pMidiParser->jumpToTick(0); pSnd->pMidiParser->jumpToTick(0);
else
// Fast forward to the last position and perform associated events when loading
pSnd->pMidiParser->jumpToTick(pSnd->ticker, true);
} }
_mutex.unlock(); _mutex.unlock();
} }