Microsoft DirectX 9.0 |
The GetSpeakerConfig method retrieves the speaker configuration.
Syntax
HRESULT GetSpeakerConfig(
LPDWORD pdwSpeakerConfig
);
Parameters
pdwSpeakerConfig
Address of the speaker configuration for this device. The speaker configuration is specified with one of the values shown in the following table.
Value | Description |
DSSPEAKER_5POINT1 | The audio is played through a speaker arrangement of five surround speakers with a subwoofer. |
DSSPEAKER_DIRECTOUT | The audio is passed through directly, without being configured for speakers. |
DSSPEAKER_HEADPHONE | The audio is played through headphones. |
DSSPEAKER_MONO | The audio is played through a single speaker. |
DSSPEAKER_QUAD | The audio is played through quadraphonic speakers. |
DSSPEAKER_STEREO | The audio is played through stereo speakers (default value). |
DSSPEAKER_SURROUND | The audio is played through surround speakers. |
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 shown 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_INVALIDPARAM |
DSERR_UNINITIALIZED |
Remarks
The value returned at pdwSpeakerConfig can be a packed DWORD containing both configuration and geometry information. Use the DSSPEAKER_CONFIG and DSSPEAKER_GEOMETRY macros to unpack the DWORD, as in the following example:
if (DSSPEAKER_CONFIG(dwSpeakerConfig) == DSSPEAKER_STEREO)
{
if (DSSPEAKER_GEOMETRY(dwSpeakerConfig) ==
DSSPEAKER_GEOMETRY_WIDE)
{
// Configuration is wide stereo.
...}
}
Requirements
Header: Declared in dsound.h.
See Also