Sets the factors that affect the calculations of 3D sound.
BOOL WINAPI BASS_Set3DFactors( |
Parameters
distf | The distance factor... less than 0.0 = leave current... examples: 1.0 = use meters, 0.9144 = use yards, 0.3048 = use feet. By default BASS measures distances in meters, you can change this setting if you are using a different unit of measurement. |
rollf | The rolloff factor, how fast the sound quietens with distance... 0.0 (min) - 10.0 (max), less than 0.0 = leave current... examples: 0.0 = no rolloff, 1.0 = real world, 2.0 = 2x real. |
doppf | The doppler factor... 0.0 (min) - 10.0 (max), less than 0.0 = leave current... examples: 0.0 = no doppler, 1.0 = real world, 2.0 = 2x real. The doppler effect is the way a sound appears to change pitch when it is moving towards or away from you. The listener and sound velocity settings are used to calculate this effect, this doppf value can be used to lessen or exaggerate the effect. |
Return value
If succesful, then TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.
Error codes
BASS_ERROR_NO3D | BASS_Init has not been successfully called with BASS_DEVICE_3D specified in the flags parameter. |
Remarks
As with all 3D functions, use BASS_Apply3D to apply the changes.
Example
To use yards as the distance measurement unit, while leaving the current rolloff and doppler factors untouched.
BASS_Set3DFactors(0.9144, -1.0, -1.0); |
See also
BASS_Apply3D, BASS_Get3DFactors