DirectX SDK

Listener Position and Velocity

[C++]

An application can set and retrieve a listener's position in 3-D space by using the IDirectSound3DListener::SetPosition and IDirectSound3DListener::GetPosition methods.

To set or retrieve the velocity value that DirectSound uses to calculate Doppler-shift effects for a listener, use the IDirectSound3DListener::SetVelocity and IDirectSound3DListener::GetVelocity methods. Velocity is measured in distance units per second—by default, meters per second.

[Visual Basic]

An application can set and retrieve a listener's position in 3-D space by using the DirectSound3DListener.SetPosition and DirectSound3DListener.GetPosition methods.

To set or retrieve the velocity value that DirectSound uses to calculate Doppler-shift effects for a listener, use the DirectSound3DListener.SetVelocity and DirectSound3DListener.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 entirely up to the application to set an appropriate velocity for the listener.