Previous Topic Index Next Topic
[API function]

FSOUND_3D_SetAttributes

This updates the position and velocity of a 3d sound playing on a channel.

signed char F_API FSOUND_3D_SetAttributes(
int channel,
float *pos,
float *vel
);

Parameters

channel Channel you want to apply 3d positioning to.
pos Pointer to a position vector (xyz float triplet) of the emitter in world space,
measured in distance units.
This can be NULL to ignore it.
vel Pointer to a velocity vector (xyz float triplet), of the emitter measured in
distance units PER SECOND.
This can be NULL to ignore it.

Return Value

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

Remarks

FSOUND treats +X as right, +Y as up, and +Z as forwards.
---------
A 'distance unit' is specified by FSOUND_3D_Listener_SetDistanceFactor. By default this is
set to meters which is a distance scale of 1.0. See FSOUND_3D_Listener_SetDistanceFactor
for more on this.
---------
FSOUND vectors expect 3 floats representing x y and z in that order. Ie a typical definition
of a vector is
typedef struct
{
float x;
float y;
float z;
} VECTOR;
or simply an array of 3 floats.

See Also

FSOUND_3D_GetAttributes , FSOUND_3D_Listener_GetAttributes , FSOUND_3D_Listener_SetAttributes , FSOUND_3D_Listener_SetDistanceFactor , FSOUND_3D_Listener_SetRolloffFactor , FSOUND_3D_Update , FSOUND_Sample_SetMinMaxDistance

This document copyright ©Firelight Multimedia, 1999-2001. All rights reserved.
Generated Thu Sep 13 00:18:08 2001 by SourceDoc v0.10, the automated source code documenter.