Microsoft DirectX 8.0 (C++)

IDirectSound3DListener8

Used to retrieve and set parameters that describe a listener's position, orientation, and listening environment in 3-D space.

The interface can be obtained by calling the IDirectSoundBuffer8::QueryInterface method on a primary buffer created with the DSBCAPS_CTRL3D flag. Applications that use audiopaths can obtain the interface from the audiopath as in the following code example, where pAudiopath is an IDirectMusicAudioPath8 interface pointer.

IDirectSound3DListener8 *pListener;
 
pAudioPath->GetObjectInPath(0, DMUS_PATH_PRIMARY_BUFFER,
        0, GUID_All_Objects, 0, IID_IDirectSound3DListener,
        (void **)&pListener)));

The methods of the IDirectSound3DListener8 interface can be organized into the following groups:

Batch parameters GetAllParameters
  SetAllParameters
Deferred settings CommitDeferredSettings
Distance factor GetDistanceFactor
  SetDistanceFactor
Doppler factor GetDopplerFactor
  SetDopplerFactor
Orientation GetOrientation
  SetOrientation
Position GetPosition
  SetPosition
Rolloff factor GetRolloffFactor
  SetRolloffFactor
Velocity GetVelocity
  SetVelocity

The IDirectSound3DListener8 interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:

IUnknown AddRef
  QueryInterface
  Release

The LPDIRECTSOUND3DLISTENER type is defined as a pointer to the IDirectSound3DListener interface:

typedef struct IDirectSound3DListener    *LPDIRECTSOUND3DLISTENER;

Requirements

  Header: Declared in dsound.h.