SSpSource_SetVelocity
You can use theSSpSource_SetVelocityfunction 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_SetVelocityfunction sets the untransformed velocity vector of the sound source specified by theinSourceReferenceparameter to the vector specified by theinVelocityparameter. TheinVelocityparameter 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_CalcLocalizationfunction. If you callSSpSource_CalcLocalizationand then change the location of the source (either by callingSSpSource_SetPositionorSSpSource_SetTransform) without callingSSpSource_SetVelocity, SoundSprocket will compute a velocity vector for you automatically.A velocity is specified in listener units per second.