aboutsummaryrefslogtreecommitdiff
path: root/insane.cpp
diff options
context:
space:
mode:
authorPaweł Kołodziejski2002-05-23 23:25:34 +0000
committerPaweł Kołodziejski2002-05-23 23:25:34 +0000
commit567b87afb5859a8497d80320c0385aefc64aee1b (patch)
treee56c28973abfbd74204f465d1d07205ec946a1dc /insane.cpp
parent0620c9d66a4435931aebaaae8edb019685fc3d9d (diff)
downloadscummvm-rg350-567b87afb5859a8497d80320c0385aefc64aee1b.tar.gz
scummvm-rg350-567b87afb5859a8497d80320c0385aefc64aee1b.tar.bz2
scummvm-rg350-567b87afb5859a8497d80320c0385aefc64aee1b.zip
Update for 16 bits and stereo smush sound in the dig
svn-id: r4379
Diffstat (limited to 'insane.cpp')
-rw-r--r--insane.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/insane.cpp b/insane.cpp
index c9f2a8033b..42601c0458 100644
--- a/insane.cpp
+++ b/insane.cpp
@@ -198,17 +198,23 @@ void SmushPlayer::parseIACT() {
error("trk %d: no FRMT section");
_imusCodec[idx] = READ_BE_UINT32(_cur + pos + 16);
_imusRate[idx] = READ_BE_UINT32(_cur + pos + 20);
+ _imusChan[idx] = READ_BE_UINT32(_cur + pos + 24);
_imusPos[idx] = 0;
break;
case 'DATA' :
switch (_imusCodec[idx]) {
case 8 :
+ if (_imusChan[idx] == 2)
+ flags |= SoundMixer::FLAG_STEREO;
flags |= SoundMixer::FLAG_UNSIGNED;
buf = (byte *) malloc(sublen);
memcpy(buf, _cur + pos, sublen);
bpos = sublen;
break;
case 12 :
+ if (_imusChan[idx] == 2)
+ flags |= SoundMixer::FLAG_STEREO;
+ flags |= SoundMixer::FLAG_16BITS;
buf = (byte *) malloc(2 * sublen);
bpos = 0;
@@ -229,15 +235,15 @@ void SmushPlayer::parseIACT() {
temp = (temp | _imusData[idx][0]) << 4;
temp -= 0x8000;
- //buf[bpos++] = temp & 0xff;
buf[bpos++] = (temp >> 8) & 0xff;
+ buf[bpos++] = temp & 0xff;
temp = (_imusData[idx][1] & 0xf0) << 4;
temp = (temp | _imusData[idx][2]) << 4;
temp -= 0x8000;
- //buf[bpos++] = temp & 0xff;
buf[bpos++] = (temp >> 8) & 0xff;
+ buf[bpos++] = temp & 0xff;
_imusPos[idx] = 0;
}
}