- fixes bug #1962601 at least for intro and outro

- add a mutex lock in sound_towns

svn-id: r32155
This commit is contained in:
Florian Kagerer 2008-05-17 17:44:23 +00:00
parent 56b894bb2d
commit bf35e95049
2 changed files with 8 additions and 7 deletions

View File

@ -855,8 +855,8 @@ int KyraEngine_HoF::seq_finaleFunters(WSAMovie_v2 *wsaObj, int x, int y, int frm
seq_printCreditsString(81, 240, 70, _seqTextColorMap, 252);
seq_printCreditsString(82, 240, 90, _seqTextColorMap, _seqTextColor[0]);
_screen->copyPage(2, 12);
delay(endtime - _system->getMillis());
seq_playTalkText(_flags.isTalkie ? 28 : 24);
delay(endtime - _system->getMillis());
_seqTextColor[0] = 1;
if (_flags.isTalkie) {
@ -2337,8 +2337,11 @@ void KyraEngine_HoF::seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, i
uint32 chatTimeout = _system->getMillis() + dur * _tickLength;
int curframe = firstframe;
if (vocIndex && speechEnabled())
if (vocIndex && speechEnabled()) {
while (_sound->voiceIsPlaying() && !skipFlag())
delay(4);
seq_playTalkText(vocIndex);
}
while (_system->getMillis() < chatTimeout && !(_abortIntroFlag || skipFlag())) {
if (lastframe < 0) {
@ -2377,11 +2380,8 @@ void KyraEngine_HoF::seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, i
if (_abortIntroFlag || skipFlag())
_sound->voiceStop();
if (lastframe < 0) {
int t = ABS(lastframe);
if (t < curframe)
curframe = t;
}
if (ABS(lastframe) < curframe)
curframe = ABS(lastframe);
if (curframe == firstframe)
curframe++;

View File

@ -1301,6 +1301,7 @@ bool SoundTowns::loadInstruments() {
void SoundTowns::playEuphonyTrack(uint32 offset, int loop) {
uint8 * twm = _vm->resource()->fileData("twmusic.pak", 0);
Common::StackLock lock(_mutex);
if (!_parser) {
_parser = new MidiParser_EuD(_driver->queue());