3D audio and volume level

Started by Matej,

Matej

We are writing a simple 3d audio app and have some questions about the volume levels.

1. I can see that you can set a global rolloff with BASS_Set3DFactors. However, is it possible for each 3D channel to have its own rolloff? Or make custom rolloffs?
2. Since 3d channels have a min and max distance, what happens when we change the volume level of a channel with BASS_ChannelSetAttribute? Does it change the max volume that is at the max distance

Thank you in advance

Ian @ un4seen

It isn't possible to set a different rolloff factor for each channel, but I think it should be possible to achieve what you want by adjusting the channel's minimum distance (via BASS_ChannelSet3DAttributes). BASS emulates DirectSound3D's system, which is described here:

    https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ee418662(v=vs.85)

The BASS_ATTRIB_VOLUME setting is applied on top of the 3D distance level, so it affects all distances. For example, if the level from the 3D distance is 0.4 and BASS_ATTRIB_VOLUME is 0.5 then the final level is 0.2 (0.4 x 0.5).

Btw, if you're planning to set the listener velocity (via BASS_Set3DPosition) for a Doppler effect, the current BASS release has a bug in that calculation. That will be fixed in the next release, and you can use this latest build in the meantime:

    www.un4seen.com/stuff/bass.zip