IDirectSound8::GetSpeakerConfig Method

The GetSpeakerConfig method retrieves the speaker configuration.

Syntax

HRESULT GetSpeakerConfig(
         LPDWORD pdwSpeakerConfig
)

Parameters

Return Value

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.
     ...}
      }
	 

To use #defines implemented in Windows Vista, set the DIRECTSOUND_VERSION to 0x1000 before including dsound.h.

Requirements

Header: Declared in DSound.h.

Library: Use Dsound3d.dll.

See Also

IDirectSound8