diff options
author | Paweł Kołodziejski | 2002-05-23 23:25:34 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2002-05-23 23:25:34 +0000 |
commit | 567b87afb5859a8497d80320c0385aefc64aee1b (patch) | |
tree | e56c28973abfbd74204f465d1d07205ec946a1dc | |
parent | 0620c9d66a4435931aebaaae8edb019685fc3d9d (diff) | |
download | scummvm-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
-rw-r--r-- | insane.cpp | 10 | ||||
-rw-r--r-- | smush.h | 2 |
2 files changed, 9 insertions, 3 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; } } @@ -72,7 +72,7 @@ struct SmushPlayer { /* IACT: The Dig audio */ uint32 _imusSize[8], _imusSubSize[8]; - uint32 _imusTrk[8], _imusRate[8]; + uint32 _imusTrk[8], _imusRate[8], _imusChan[8]; uint32 _imusSubTag[8]; byte _imusData[8][3]; uint32 _imusPos[8], _imusCodec[8]; |