AUDCLNT_SHAREMODE enumeration (audiosessiontypes.h)

The AUDCLNT_SHAREMODE enumeration defines constants that indicate whether an audio stream will run in shared mode or in exclusive mode.

Syntax

typedef enum _AUDCLNT_SHAREMODE {
  AUDCLNT_SHAREMODE_SHARED,
  AUDCLNT_SHAREMODE_EXCLUSIVE
} AUDCLNT_SHAREMODE;

Constants

 
AUDCLNT_SHAREMODE_SHARED
The audio stream will run in shared mode. For more information, see Remarks.
AUDCLNT_SHAREMODE_EXCLUSIVE
The audio stream will run in exclusive mode. For more information, see Remarks.

Remarks

The IAudioClient::Initialize and IAudioClient::IsFormatSupported methods use the constants defined in the AUDCLNT_SHAREMODE enumeration.

In shared mode, the client can share the audio endpoint device with clients that run in other user-mode processes. The audio engine always supports formats for client streams that match the engine's mix format. In addition, the audio engine might support another format if the Windows audio service can insert system effects into the client stream to convert the client format to the mix format.

In exclusive mode, the Windows audio service attempts to establish a connection in which the client has exclusive access to the audio endpoint device. In this mode, the audio engine inserts no system effects into the local stream to aid in the creation of the connection point. Either the audio device can handle the specified format directly or the method fails.

For more information about shared-mode and exclusive-mode streams, see User-Mode Audio Components.

Starting with Xbox May 2021 Update, you can open an audio client in exclusive mode on Xbox.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Header audiosessiontypes.h

See also

Core Audio Constants

Core Audio Enumerations

IAudioClient::Initialize

IAudioClient::IsFormatSupported