Doppler Factor

DirectSound applies Doppler-shift effects to sounds, based on the relative velocity of the listener and the sound buffer. (For an overview, see Doppler Shift.) The Doppler shift can be ignored, exaggerated, or given the same effect as in the real world, depending on a variable called the Doppler factor.

The Doppler factor can range from DS3D_MINDOPPLERFACTOR to DS3D_MAXDOPPLERFACTOR, currently defined in Dsound.h as 0.0 and 10.0 respectively. A value of 0 means no Doppler shift is applied to a sound. Every other value represents a multiple of the real-world Doppler shift. In other words, a value of 1 (or DS3D_DEFAULTDOPPLERFACTOR) means the Doppler shift that would be experienced in the real world is applied to the sound; a value of 2 means two times the real-world Doppler shift; and so on.

The Doppler factor can be set and retrieved with the IDirectSound3DListener::SetDopplerFactor and IDirectSound3DListener::GetDopplerFactor methods.