<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > TBASS (Sound Module) > TBASS 3D and EAX > TBASS_Set3DFactors |
Description
Sets the factors that affect the calculations of 3D sound.
Syntax
n = TBASS_Set3DFactors(DistF, RollF, DoppF)
Returns
Number
If successful, then %TBASS_TRUE is returned, else %TBASS_FALSE is returned. Use TBASS_ErrorGetCode to get the error code.
Parameters
Name |
Type |
Optional |
Meaning |
DistF |
Numeric |
No |
The distance factor 0 or less = leave current examples: 1.0 = use meters, 0.9144 = use yards, 0.3048 = use feet. By default library measures distances in meters, you can change this setting if you are using a different unit of measurement. |
RollF |
Numeric |
No |
The rolloff factor, how fast the sound quietness 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 |
Numeric |
No |
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. |
Remarks
As with all 3D functions, use TBASS_Apply3D to apply the changes.
Restrictions
See also
Examples