Sets the 3D attributes of a sample, stream, or MOD music channel with 3D functionality.
BOOL WINAPI BASS_ChannelSet3DAttributes( |
Parameters
handle | The channel handle... a HCHANNEL, HMUSIC, HSTREAM. | ||||||
mode | The 3D processing mode... one of these flags.
| ||||||
min | The minimum distance. The channel's volume stops increasing when the listener is within this distance. | ||||||
max | The maximum distance. The channel's volume stops decreasing when the listener is past this distance. | ||||||
iangle | The angle of the inside projection cone in degrees... 0 (no cone) - 360 (sphere). | ||||||
oangle | The angle of the outside projection cone in degrees... 0 (no cone) - 360 (sphere). | ||||||
outvol | The delta-volume outside the outer projection cone... 0 (silent) - 100 (same as inside the cone). |
Return value
If succesful, then TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.
Error codes
BASS_ERROR_HANDLE | handle is not a valid channel. |
BASS_ERROR_NO3D | The channel does not have 3D functionality... it wasn't created or loaded with the BASS_xxx_3D flag. |
Remarks
The iangle and oangle parameters must both be set in a single call to this function (ie. you can't set one without the other). The iangle and oangle angles decide how wide the sound is projected around the orientation angle. Within the inside angle the volume level is the channel volume, as set with BASS_ChannelSetAttributes. Outside the outer angle, the volume changes according to the outvol value. Between the inner and outer angles, the volume gradually changes between the inner and outer volume levels. If the inner and outer angles are 360 degrees, then the sound is transmitted equally in all directions.
As with all 3D functions, use BASS_Apply3D to apply the changes made.
See also
BASS_ChannelGet3DAttributes, BASS_ChannelSet3DPosition, BASS_ChannelSetAttributes