diff options
author | Johannes Schickel | 2012-09-08 00:54:42 +0200 |
---|---|---|
committer | Johannes Schickel | 2012-09-08 01:16:10 +0200 |
commit | b48f5b78b759981a0c29b2d7ccbecc7bb0076a1b (patch) | |
tree | 2a52fb6f0dae8037826b77845258ca5e2e785f0d /engines/cine | |
parent | 35e61b7c7a62cc8692ec258189a2690a7494c30c (diff) | |
download | scummvm-rg350-b48f5b78b759981a0c29b2d7ccbecc7bb0076a1b.tar.gz scummvm-rg350-b48f5b78b759981a0c29b2d7ccbecc7bb0076a1b.tar.bz2 scummvm-rg350-b48f5b78b759981a0c29b2d7ccbecc7bb0076a1b.zip |
CINE: Implement panning for sfx for FW Amiga and AtariST.
Diffstat (limited to 'engines/cine')
-rw-r--r-- | engines/cine/sound.cpp | 13 | ||||
-rw-r--r-- | engines/cine/sound.h | 1 |
2 files changed, 13 insertions, 1 deletions
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 diff --git a/engines/cine/sound.h b/engines/cine/sound.h index 515d4693e6..fe1c5a9130 100644 --- a/engines/cine/sound.h +++ b/engines/cine/sound.h @@ -114,6 +114,7 @@ protected: } }; SfxChannel _channelsTable[NUM_CHANNELS]; + static const int _channelBalance[NUM_CHANNELS]; int _sfxTimer; static void sfxTimerProc(void *param); void sfxTimerCallback(); |