##### [API function]

## FSOUND_3D_SetMinMaxDistance

Sets the minimum and maximum audible distance for a channel.
MinDistance is the minimum distance that the sound emitter will cease to continue growing
louder at (as it approaches the listener). Within the mindistance it stays at the constant loudest volume possible. Outside of this mindistance it begins to attenuate.
MaxDistance is the distance a sound stops attenuating at. Beyond this point it will stay at the volume it would be at maxdistance units from the listener and will not attenuate any more.
MinDistance is useful to give the impression that the sound is loud or soft in 3d space. An example of this is a small quiet object, such as a bumblebee, which you could set a mindistance of to 0.1 for example, which would cause it to attenuate quickly and dissapear when only a few meters away from the listener.
Another example is a jumbo jet, which you could set to a mindistance of 100.0, which would keep the sound volume at max until the listener was 100 meters away, then it would be hundreds of meters more before it would fade out.
-------
In summary, increase the mindistance of a sound to make it 'louder' in a 3d world, and
decrease it to make it 'quieter' in a 3d world.
maxdistance is effectively obsolete unless you need the sound to stop fading out at a certain point. Do not adjust this from the default if you dont need to.
Some people have the confusion that maxdistance is the point the sound will fade out to, this is not the case.

signed char F_API FSOUND_3D_SetMinMaxDistance(
int channel,
F_FLOAT_API min,
F_FLOAT_API max
);

### Parameters

sptr | The channel to have its minimum and maximum distance set.
min | The channels minimum volume distance in "units". See remarks for more on units.
max | The channels maximum volume distance in "units". See remarks for more on units.

### Return Value

On success, TRUE is returned.
On failure, FALSE is returned.

### Remarks

FSOUND_ALL is supported. Passing this will set the min/max distance on ALL channels available.
A 'distance unit' is specified by FSOUND_3D_SetDistanceFactor. By default this is set to meters which is a distance scale of 1.0.
See FSOUND_3D_SetDistanceFactor for more on this.
The default units for minimum and maximum distances are 1.0 and 1000000000.0f.
Volume drops off at mindistance / distance.
To define the min and max distance per sound and not per channel use FSOUND_Sample_SetMinMaxDistance.
___________________
Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube

### See Also

FSOUND_3D_GetMinMaxDistance , FSOUND_3D_SetAttributes , FSOUND_3D_SetDistanceFactor , FSOUND_Sample_SetMinMaxDistance

This document copyright ©Firelight Technologies, Pty, Ltd, 1999-2002. All rights reserved.
Generated Thu Dec 15 17:31:28 2005 by SourceDoc v0.10, the automated source code documenter.