Microsoft DirectX 8.1 (C++) |
3-D sounds have position and velocity. It is entirely up to the application to specify values for both.
Position is expressed as a vector, relative to either world space or the listener, depending on the processing mode.
Velocity is measured in distance units per secondby default, meters per second. Velocity is used only in calculating the effects of Doppler shift and does not have to correspond to the actual rate of movement of the sound source.
An application can set and retrieve a sound source's position in 3-D space by using the IDirectSound3DBuffer8::SetPosition and IDirectSound3DBuffer8::GetPosition methods.
To set or retrieve the velocity, use the IDirectSound3DBuffer8::SetVelocity and IDirectSound3DBuffer8::GetVelocity methods.