diff options
author | Paweł Kołodziejski | 2003-12-26 16:44:25 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-12-26 16:44:25 +0000 |
commit | 23f03b4ad0ca459bebba8f73f15fd2d83cbff800 (patch) | |
tree | 42f08e5deba13af97539f6062ac2974472d72288 | |
parent | 612266d8a514a15a8ccf91956908a8b742587df2 (diff) | |
download | scummvm-rg350-23f03b4ad0ca459bebba8f73f15fd2d83cbff800.tar.gz scummvm-rg350-23f03b4ad0ca459bebba8f73f15fd2d83cbff800.tar.bz2 scummvm-rg350-23f03b4ad0ca459bebba8f73f15fd2d83cbff800.zip |
corrections for pan control
svn-id: r11948
-rw-r--r-- | scumm/imuse_digi.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scumm/imuse_digi.cpp b/scumm/imuse_digi.cpp index fff259134e..f2f0ae06b0 100644 --- a/scumm/imuse_digi.cpp +++ b/scumm/imuse_digi.cpp @@ -743,12 +743,13 @@ void IMuseDigital::callback() { _channel[l].toBeRemoved = true; } + int pan = (_channel[l].pan != 64) ? 2 * _channel[l].pan - 127 : 0; if (_scumm->_mixer->isReady()) { if (!_channel[l].handle.isActive()) _scumm->_mixer->newStream(&_channel[l].handle, _channel[l].freq, _channel[l].mixerFlags, 100000); _scumm->_mixer->setChannelVolume(_channel[l].handle, _channel[l].vol / 1000); - _scumm->_mixer->setChannelPan(_channel[l].handle, _channel[l].pan); + _scumm->_mixer->setChannelPan(_channel[l].handle, pan); _scumm->_mixer->appendStream(_channel[l].handle, _channel[l].data + _channel[l].offset, mixer_size); } _channel[l].offset += mixer_size; @@ -788,7 +789,7 @@ void IMuseDigital::startSound(int sound) { } else { error("IMuseDigital::startSound() unknown condition"); } - _channel[l].pan = 0; + _channel[l].pan = 64; _channel[l].vol = 127 * 1000; _channel[l].volFadeDest = 0; _channel[l].volFadeStep = 0; @@ -903,9 +904,7 @@ void IMuseDigital::startSound(int sound) { if (_scumm->_actorToPrintStrFor != 0xFF && _scumm->_actorToPrintStrFor != 0) { Actor *a = _scumm->derefActor(_scumm->_actorToPrintStrFor, "playBundleSound"); _channel[l].freq = (_channel[l].freq * a->talkFrequency) / 256; - - // Adjust to fit the mixer's notion of panning. - _channel[l].pan = (a->talkPan != 64) ? 2 * a->talkPan - 127 : 0; + _channel[l].pan = a->talkPan; } } |