aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorPaweł Kołodziejski2002-10-02 18:51:58 +0000
committerPaweł Kołodziejski2002-10-02 18:51:58 +0000
commit87ae5b24c7ed1d44865a115e88dc1ddcbbcba218 (patch)
treebeea0193b91c1df9d88d4b8bb4b6713cd34a0b04 /scumm
parent518cfaafcc4479c68518f350844717bfe4258c5e (diff)
downloadscummvm-rg350-87ae5b24c7ed1d44865a115e88dc1ddcbbcba218.tar.gz
scummvm-rg350-87ae5b24c7ed1d44865a115e88dc1ddcbbcba218.tar.bz2
scummvm-rg350-87ae5b24c7ed1d44865a115e88dc1ddcbbcba218.zip
fix for imuse
svn-id: r5078
Diffstat (limited to 'scumm')
-rw-r--r--scumm/imuse.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp
index dfb3fa91b3..cbc6e56fc7 100644
--- a/scumm/imuse.cpp
+++ b/scumm/imuse.cpp
@@ -4902,11 +4902,8 @@ void IMuseDigital::handler() {
}
} else if (_channel[l]._bits == 8) {
for(i = 0; i < (mixer_size / 2); i++) {
- byte sample1 = buf[i * 2 + 0];
- byte sample2 = buf[i * 2 + 1];
- uint16 sample_a = (uint16)(((int16)((sample1 << 8) | sample2) * _channel[l]._volumeLeft) >> 8);
- buf[i * 2 + 0] = (byte)(sample_a >> 8);
- buf[i * 2 + 1] = (byte)(sample_a & 0xff);
+ buf[i * 2 + 0] = (byte)(((int16)(buf[i * 2 + 0] * _channel[l]._volumeLeft)) >> 8);
+ buf[i * 2 + 1] = (byte)(((int16)(buf[i * 2 + 1] * _channel[l]._volumeRight)) >> 8);
}
}
@@ -5045,7 +5042,7 @@ void IMuseDigital::startSound(int sound) {
if (_channel[l]._bits == 12) {
_channel[l]._mixerSize *= 2;
_channel[l]._mixerFlags |= SoundMixer::FLAG_16BITS;
- _channel[l]._size = _scumm->_sound->decode12BitsSample(ptr, &_channel[l]._data, size, (_channel[l]._channels == 1) ? false : true);
+ _channel[l]._size = _scumm->_sound->decode12BitsSample(ptr, &_channel[l]._data, size, (_channel[l]._channels == 2) ? false : true);
}
if (_channel[l]._bits == 8) {
_channel[l]._mixerFlags |= SoundMixer::FLAG_UNSIGNED;