How do volume settings mix in BASS?

Started by parkert,

parkert

I'm porting some code that uses BASS to Javascript/WebAudio that sets volume in different ways.

When I use BASS_SetVolume, BASS_SetGlobalVolumes, and BASS_SampleSetInfo, do the volumes in each of these combine multiplicatively?

For instance, if I set them all to 50%, does my sound sample play at 12.5% of its original volume? Or does it combine in some other way (e.g. minimum or setting the system volume)?

Also, is volume in BASS 1:1 equivalent to "gain" in WebAudio? With WebAudio, I can use a gain of > 1.0, which boosts audio but may cause it to clip, while BASS has a max of 1.0.

Ian @ un4seen

The final volume level will indeed be a product of the device/global/channel volume settings. BASS_SampleSetInfo can actually set a volume greater than 1.0, as can BASS_ATTRIB_VOL (BASS_SampleSetInfo sets the default for that in the case of a sample channel).