SSpSource_SetVelocity
You can use theSSpSource_SetVelocity
function to set the velocity of a sound source.
OSStatus SSpSource_SetVelocity ( SSpSourceReference inSourceReference, const TQ3Vector3D *inVelocity);
inSourceReference
- A source reference.
inVelocity
- A vector indicating the desired velocity of the sound source.
- function result
- A result code.
DESCRIPTION
TheSSpSource_SetVelocity
function sets the untransformed velocity vector of the sound source specified by theinSourceReference
parameter to the vector specified by theinVelocity
parameter. TheinVelocity
parameter specifies the untransformed velocity of the sound source (that is, the velocity of the sound source before the sound source's transform is applied). The actual velocity of the sound source is calculated at the time you call theSSpSource_CalcLocalization
function. If you callSSpSource_CalcLocalization
and then change the location of the source (either by callingSSpSource_SetPosition
orSSpSource_SetTransform
) without callingSSpSource_SetVelocity
, SoundSprocket will compute a velocity vector for you automatically.A velocity is specified in listener units per second.