SSpListener_SetVelocity
You can use theSSpListener_SetVelocity
function 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_SetVelocity
function sets the untransformed velocity vector of the listener specified by theinListenerReference
parameter to the vector specified by theinVelocity
parameter. TheinVelocity
parameter 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_CalcLocalization
function. If you callSSpSource_CalcLocalization
and then change the location of the listener (either by callingSSpListener_SetPosition
orSSpListener_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_SetMetersPerUnit
function.