From b48f5b78b759981a0c29b2d7ccbecc7bb0076a1b Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 8 Sep 2012 00:54:42 +0200 Subject: CINE: Implement panning for sfx for FW Amiga and AtariST. --- engines/cine/sound.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'engines/cine/sound.cpp') diff --git a/engines/cine/sound.cpp b/engines/cine/sound.cpp index 97336b1c1a..ead17b1c2f 100644 --- a/engines/cine/sound.cpp +++ b/engines/cine/sound.cpp @@ -1082,7 +1082,8 @@ void PaulaSound::playSound(int channel, int frequency, const uint8 *data, int si // Start the sfx _mixer->playStream(Audio::Mixer::kSFXSoundType, &_channelsTable[channel].handle, Audio::makeLoopingAudioStream(stream, repeat ? 0 : 1), - -1, volume * Audio::Mixer::kMaxChannelVolume / 63); + -1, volume * Audio::Mixer::kMaxChannelVolume / 63, + _channelBalance[channel]); } } } @@ -1132,4 +1133,14 @@ void PaulaSound::sfxTimerCallback() { } } +const int PaulaSound::_channelBalance[NUM_CHANNELS] = { + // L/R/R/L This is according to the Hardware Reference Manual. + // TODO: It seems the order is swapped for some Amiga models: + // http://www.amiga.org/forums/archive/index.php/t-7862.html + // Maybe we should consider using R/L/L/R to match Amiga 500? + // This also is a bit more drastic to what WineUAE defaults, + // which is only 70% of full panning. + -127, 127, 127, -127 +}; + } // End of namespace Cine -- cgit v1.2.3