SSpListener_SetVelocity
You can use theSSpListener_SetVelocityfunction to set the velocity of a listener.
OSStatus SSpListener_SetVelocity ( SSpListenerReference inListenerReference, const TQ3Vector3D *inVelocity);
inListenerReference- A listener reference.
inVelocity- A vector indicating the desired velocity of the listener.
- function result
- A result code.
DESCRIPTION
TheSSpListener_SetVelocityfunction sets the untransformed velocity vector of the listener specified by theinListenerReferenceparameter to the vector specified by theinVelocityparameter. TheinVelocityparameter specifies the untransformed velocity of the listener (that is, the velocity of the listener before the listener's transform is applied). The actual velocity of the listener is calculated at the time you call theSSpSource_CalcLocalizationfunction. If you callSSpSource_CalcLocalizationand then change the location of the listener (either by callingSSpListener_SetPositionorSSpListener_SetTransform) without callingSSpListener_SetVelocity, SoundSprocket will compute a velocity vector for you automatically.A velocity is specified in listener units per second, where a listener unit is either a meter or the unit specified in a call to the
SSpListener_SetMetersPerUnitfunction.