Microsoft DirectX 9.0

IDirectSound8::SetSpeakerConfig

The SetSpeakerConfig method specifies the speaker configuration of the device.

Note   This function controls a global Windows setting that affect all users and applications on the system. It is provided only for use by configuration utilities provided by audio device vendors.  No other applications should call it.

Syntax

HRESULT SetSpeakerConfig(
  DWORD dwSpeakerConfig 
);

Parameters

dwSpeakerConfig

Speaker configuration of the specified device object. This parameter can be one of the values shown in the following tables.

 

Value Description
DSSPEAKER_5POINT1 The audio is played through a speaker arrangement of surround speakers with a subwoofer.
DSSPEAKER_DIRECTOUT The audio is passed through directly, without being configured for speakers.
DSSPEAKER_HEADPHONE The speakers are headphones.
DSSPEAKER_MONO The speakers are monaural.
DSSPEAKER_QUAD The speakers are quadraphonic.
DSSPEAKER_STEREO The speakers are stereo (default value).
DSSPEAKER_SURROUND The speakers are surround sound.
DSSPEAKER_7POINT1 The audio is played through a speaker arrangement of seven surround speakers with a subwoofer.

DSSPEAKER_STEREO can be combined with one of the values in the following table.

Value Description
DSSPEAKER_GEOMETRY_WIDE The speakers are directed over an arc of 20 degrees.
DSSPEAKER_GEOMETRY_NARROW The speakers are directed over an arc of 10 degrees.
DSSPEAKER_GEOMETRY_MIN The speakers are directed over an arc of 5 degrees.
DSSPEAKER_GEOMETRY_MAX The speakers are directed over an arc of 180 degrees.

Return Values

If the method succeeds, the return value is DS_OK.

If the method fails, the return value may be one of the error values shown in the following table.

Return code
DSERR_INVALID PARAM
DSERR_UNINITIALIZED

Remarks

If a geometry value is to be used, it must be packed in a DWORD along with the DSSPEAKER_STEREO flag. This can be done by using the DSSPEAKER_COMBINED macro, as in the following C++ example:

lpds->SetSpeakerConfig(DSSPEAKER_COMBINED(
    DSSPEAKER_STEREO, DSSPEAKER_GEOMETRY_WIDE));

Requirements

  Header: Declared in dsound.h.

See Also