次の方法で共有


IDirectSound3DListener8

[The feature associated with this page, DirectSound, is a legacy feature. It has been superseded by WASAPI and Audio Graphs. Media Casting have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Media Casting instead of DirectSound, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The IDirectSound3DListener8 interface is used to retrieve and set parameters that describe a listener's position, orientation, and listening environment in 3D space.

The interface can be obtained by calling the IDirectSoundBuffer8::QueryInterface method on a primary buffer created with the DSBCAPS_CTRL3D flag.

In addition to the methods inherited from IUnknown, the IDirectSound3DListener8 interface exposes the following methods, arranged by category.

Batch Parameters

Method Description
IDirectSound3DListener8::CommitDeferredSettings The CommitDeferredSettings method commits any deferred settings made since the last call to this method.
IDirectSound3DListener8::GetAllParameters The GetAllParameters method retrieves all 3D parameters of the sound environment and the listener.
IDirectSound3DListener8::SetAllParameters The SetAllParameters method sets all 3D parameters of the sound environment and the listener.

Global Sound Properties

Method Description
IDirectSound3DListener8::GetDistanceFactor The GetDistanceFactor method retrieves the distance factor, which is the number of meters in a vector unit.
IDirectSound3DListener8::GetDopplerFactor The GetDopplerFactor method retrieves the multiplier for the Doppler effect.
IDirectSound3DListener8::GetRolloffFactor The GetRolloffFactor method retrieves the rolloff factor, which determines the rate of attenuation over distance.
IDirectSound3DListener8::SetDistanceFactor The SetDistanceFactor method sets the distance factor, which is the number of meters in a vector unit.
IDirectSound3DListener8::SetDopplerFactor The SetDopplerFactor method sets the multiplier for the Doppler effect.
IDirectSound3DListener8::SetRolloffFactor The SetRolloffFactor method sets the rolloff factor, which determines the rate of attenuation over distance.

Listener Properties

Method Description
IDirectSound3DListener8::GetOrientation The GetOrientation method retrieves the orientation of the listener's head.
IDirectSound3DListener8::GetPosition The GetPosition method retrieves the listener's position.
IDirectSound3DListener8::GetVelocity The GetVelocity method retrieves the listener's velocity.
IDirectSound3DListener8::SetOrientation The SetOrientation method sets the orientation of the listener's head.
IDirectSound3DListener8::SetPosition The SetPosition method sets the listener's position.
IDirectSound3DListener8::SetVelocity The SetVelocity method sets the listener's velocity.

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

typedef struct IDirectSound3DListener  *LPDIRECTSOUND3DLISTENER;

Requirements

Header: Declared in DSound.h.

Library: Use Dsound3d.dll.

See Also

DirectSound Interfaces