mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
It's kMaxMixerVolume, not 256 (we might change it to 255 eventually)
svn-id: r16747
This commit is contained in:
parent
86370fa544
commit
cda823ea63
@ -480,7 +480,7 @@ void Channel::mix(int16 *data, uint len) {
|
||||
// slightly odd divisor: the 255 reflects the fact that the maximal
|
||||
// value for _volume is 255, while the 127 is there because the
|
||||
// balance value ranges from -127 to 127. The mixer (music/sound)
|
||||
// volume is in the range 0 - 256.
|
||||
// volume is in the range 0 - kMaxMixerVolume.
|
||||
// Hence, the vol_l/vol_r values will be in that range, too
|
||||
|
||||
int vol = _mixer->getVolumeForSoundType(_type) * _volume;
|
||||
|
@ -255,14 +255,14 @@ public:
|
||||
/**
|
||||
* Set the volume for the given sound type.
|
||||
*
|
||||
* @param volume the new global volume, 0-256
|
||||
* @param volume the new global volume, 0-kMaxMixerVolume
|
||||
*/
|
||||
void setVolumeForSoundType(SoundType type, int volume);
|
||||
|
||||
/**
|
||||
* Query the global volume.
|
||||
*
|
||||
* @return the global music volume, 0-256
|
||||
* @return the global music volume, 0-kMaxMixerVolume
|
||||
*/
|
||||
int getVolumeForSoundType(SoundType type) const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user