DirectX SDK

DirectSound3DBuffer.GetVelocity

The DirectSound3DBuffer.GetVelocity method retrieves the current velocity for this sound buffer. Velocity is measured in units per second. The default unit is one meter, but this can be changed by using the DirectSound3DListener.SetDistanceFactor method.

object.GetVelocity(velocity As D3DVECTOR)

Parameters

object
Object expression that resolves to a DirectSound3DBuffer object.
velocity
A D3DVECTOR type that will contain the sound buffer's current velocity.

Error Codes

If the method fails, an error is raised and Err.Number may be set to DSERR_INVALIDPARAM.

Remarks

Velocity is used for Doppler effects only. It does not actually move the buffer. For additional information, see Doppler Factor.

The default unit of measurement is meters per second, but this can be changed by using the DirectSound3DListener.SetDistanceFactor method.

See Also

DirectSound3DBuffer.SetPosition, DirectSound3DBuffer.SetVelocity