aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/sound
diff options
context:
space:
mode:
authorArnaud Boutonné2009-06-16 12:25:53 +0000
committerArnaud Boutonné2009-06-16 12:25:53 +0000
commit975a0d65677a45559b1f5d4262772c0696f405b6 (patch)
treee2609ac44fc116b89bd211446f1f62d1ad973dfa /engines/gob/sound
parent2668ea46944a40a1c84993464b1922c10c5b75ba (diff)
downloadscummvm-rg350-975a0d65677a45559b1f5d4262772c0696f405b6.tar.gz
scummvm-rg350-975a0d65677a45559b1f5d4262772c0696f405b6.tar.bz2
scummvm-rg350-975a0d65677a45559b1f5d4262772c0696f405b6.zip
MDY/TBR : fix a thing or two. Still far from being OK, but in-game ambiance "music" is (a little) less buggy
svn-id: r41584
Diffstat (limited to 'engines/gob/sound')
-rw-r--r--engines/gob/sound/adlib.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp
index 8ae553ba6d..709025c6d5 100644
--- a/engines/gob/sound/adlib.cpp
+++ b/engines/gob/sound/adlib.cpp
@@ -400,14 +400,15 @@ void AdLib::pollMusic() {
}
do {
instr = *_playPos;
+// printf("instr 0x%X\n", instr);
switch(instr) {
case 0xF8:
- _wait = 0xF8;
+ _wait = *(_playPos++);
break;
case 0xFC:
_ended = true;
_samplesTillPoll = 0;
- break;
+ return;
case 0xF0:
_playPos++;
ctrlByte1 = *(_playPos++);
@@ -450,11 +451,13 @@ void AdLib::pollMusic() {
setVoiceTbr(channel, timbre, false);
break;
case 0xE0:
- printf("Pitch bend not yet implemented\n");
+ warning("Pitch bend not yet implemented\n");
note = *(_playPos)++;
note += (unsigned)(*(_playPos++)) << 7;
-
+
+ setKey(channel, note, _notOn[channel], true);
+
break;
case 0xB0:
_playPos += 2;
@@ -475,12 +478,12 @@ void AdLib::pollMusic() {
} //switch instr
} while (_wait == 0);
- if (_wait == 0x78) {
+ if (_wait == 0xF8) {
_wait = 0xF0;
if (*_playPos != 0xF8)
_wait += *(_playPos++);
}
- _playPos++;
+// _playPos++;
_samplesTillPoll = _wait * (_rate / 1000);
} else {
// First tempo, we'll ignore it...