Is there any documentation of the math used for calculating logarithmic falloff in FMOD (i.e. given distance, min distance and max distance, this is how it will arrive at the actual volume number)?
I found this one for linear falloff which is great
but I need logarithmic falloff. I am trying to port code from an old audio system that works like this:
from 0 to mindistance sound is at 100%
For each doubling of distance after mindistance volume is halved
When it hits maxdistance, sound cuts off.
I know the recommended way to go is to simply have a massive maxdistance and let fmod taper off until its inaudible but that wont work for what I am doing. Nor will linear falloff (or linear squared falloff).
Seems like the best way to do what I want (and what others in the past seem to have asked for) is a custom FMOD_3D_ROLLOFF_CALLBACK that replicates what FMOD_3D_LINEARROLLOFF would normally do until it hits maxdistance then cut off completly, hence the question about the algorithm.