It's kMaxMixerVolume, not 256 (we might change it to 255 eventually)

svn-id: r16747
This commit is contained in:
Max Horn 2005-02-06 20:35:06 +00:00
parent 86370fa544
commit cda823ea63
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;