20a0166cf4
The SDL_mixer library has already been instructed, via Mix_Volume, to scale the volume of sounds on all channels, by an amount based on digi_volume. There is no need to manipulate the effective distance of a particular sound to further scale it by digi_volume. Even if this second scale was needed, it was done incorrectly, because it was only applied when the sound was started, but not re-applied when the sound's volume was updated due to positional changes. As a result, any sound which was updated would switch to an unscaled version. Sounds which were never updated, such as those attached to the viewer object, would retain their original scaled volume. Update the implementation of digi_mixer_set_channel_volume to call Mix_SetDistance in the same way as digi_mixer_start_sound, for readability and consistency. |
||
---|---|---|
.. | ||
ogl | ||
sdl | ||
win32 |