Microsoft DirectX 8.0 (C++) |
An application can set and retrieve a listener's position in 3-D space by using the IDirectSound3DListener8::SetPosition and IDirectSound3DListener8::GetPosition methods.
To set or retrieve the velocity value that DirectSound uses to calculate Doppler-shift effects for a moving listener, use the IDirectSound3DListener8::SetVelocity and IDirectSound3DListener8::GetVelocity methods. Velocity is measured in distance units per second—by default, meters per second.
As with buffers, a listener's position and its velocity are completely independent. It is up to the application to set an appropriate velocity for the listener.