diff options
author | Florian Kagerer | 2010-07-09 21:36:59 +0000 |
---|---|---|
committer | Florian Kagerer | 2010-07-09 21:36:59 +0000 |
commit | 02cac2d5aadaf73385ea979afdf6222a72b026cf (patch) | |
tree | 5b31d115bb8c0a60d3101bc61bbd33de5bf5d5ff | |
parent | af479a20ae1df5d851a854a1d1906072b50166e3 (diff) | |
download | scummvm-rg350-02cac2d5aadaf73385ea979afdf6222a72b026cf.tar.gz scummvm-rg350-02cac2d5aadaf73385ea979afdf6222a72b026cf.tar.bz2 scummvm-rg350-02cac2d5aadaf73385ea979afdf6222a72b026cf.zip |
KYRA/PC98: fix music volume
svn-id: r50772
-rw-r--r-- | engines/kyra/sound_towns.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index f6d71f8549..8003ca25f3 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -2788,16 +2788,15 @@ void TownsPC98_OpnSquareSineSource::nextTick(int32 *buffer, uint32 bufferSize) { int32 finOut = 0; for (int ii = 0; ii < 3; ii++) { - if ((_channels[ii].vol >> 4) & 1) - finOut += _tleTable[_channels[ii].out ? _pReslt : 0]; - else - finOut += _tlTable[_channels[ii].out ? (_channels[ii].vol & 0x0f) : 0]; + int32 finOutTemp = ((_channels[ii].vol >> 4) & 1) ? _tleTable[_channels[ii].out ? _pReslt : 0] : _tlTable[_channels[ii].out ? (_channels[ii].vol & 0x0f) : 0]; if ((1 << ii) & _volMaskA) - finOut = (finOut * _volumeA) / Audio::Mixer::kMaxMixerVolume; + finOutTemp = (finOutTemp * _volumeA) / Audio::Mixer::kMaxMixerVolume; if ((1 << ii) & _volMaskB) - finOut = (finOut * _volumeB) / Audio::Mixer::kMaxMixerVolume; + finOutTemp = (finOutTemp * _volumeB) / Audio::Mixer::kMaxMixerVolume; + + finOut += finOutTemp; } finOut /= 3; |