BASS_Set3DFactors
Sets the factors that affect the calculations of 3D sound.
BOOL BASS_Set3DFactors( float distf, float rollf, float doppf );
Parameters
distf | The distance factor... 0 or less = 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 successful, then TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.Error codes
BASS_ERROR_INIT | BASS_Init has not been successfully called. |
BASS_ERROR_NO3D | The device was not initialized with 3D support. |
Remarks
As with all 3D functions, use BASS_Apply3D to apply the changes.When using multiple devices, the current thread's device setting (as set with BASS_SetDevice) determines which device this function call applies to.
Example
Use yards as the distance measurement unit, while leaving the current rolloff and doppler factors untouched.BASS_Set3DFactors(0.9144, -1.0, -1.0); BASS_Apply3D(); // apply the change