[Scummvm-cvs-logs] SF.net SVN: scummvm: [20964] scummvm/trunk/engines/kyra/sound_adlib.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Mon Feb 27 15:42:01 CET 2006
Revision: 20964
Author: lordhoto
Date: 2006-02-27 15:41:27 -0800 (Mon, 27 Feb 2006)
ViewCVS: http://svn.sourceforge.net/scummvm?rev=20964&view=rev
Log Message:
-----------
Fixes hangs in the "Pool of Sorrow" scene (at least I don't get them anymore).
Modified Paths:
--------------
scummvm/trunk/engines/kyra/sound_adlib.cpp
Modified: scummvm/trunk/engines/kyra/sound_adlib.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_adlib.cpp 2006-02-27 23:32:59 UTC (rev 20963)
+++ scummvm/trunk/engines/kyra/sound_adlib.cpp 2006-02-27 23:41:27 UTC (rev 20964)
@@ -50,9 +50,7 @@
// AudioStream API
int readBuffer(int16 *buffer, const int numSamples) {
memset(buffer, 0, sizeof(int16)*numSamples);
- lock();
YM3812UpdateOne(_adlib, buffer, numSamples);
- unlock();
return numSamples;
}
@@ -335,7 +333,7 @@
_mixer->setupPremix(this);
// the interval should be around 13000 to 20000
- Common::g_timer->installTimerProc(&AdlibTimerCall, 15000, this);
+ Common::g_timer->installTimerProc(&AdlibTimerCall, 17000, this);
}
AdlibDriver::~AdlibDriver() {
@@ -400,6 +398,7 @@
int AdlibDriver::snd_startSong(va_list &list) {
int songId = va_arg(list, int);
_flags |= 8;
+ _flagTrigger = 1;
uint16 offset = READ_LE_UINT16(&_soundData[songId << 1]);
uint8 firstByte = *(_soundData + offset);
@@ -501,8 +500,8 @@
void AdlibDriver::callback() {
lock();
- //--_flagTrigger;
- //if ((int8)_flagTrigger < 0)
+ --_flagTrigger;
+ if ((int8)_flagTrigger < 0)
_flags &= 0xFFF7;
callbackOutput();
callbackProcess();
@@ -558,6 +557,7 @@
table.unk1 = _unkTableByte1;
}
+ // TODO: check that
table.unk4 += table.unk1;
if (table.unk4 < 0) {
if (--table.unk5) {
More information about the Scummvm-git-logs
mailing list