Specifies characteristics that a client can assign to an audio stream during the initialization of the stream.


The audio stream will be a member of a cross-process audio session. For more information, see Remarks.


The audio stream will operate in loopback mode. For more information, see Remarks.


Processing of the audio buffer by the client will be event driven. For more information, see Remarks.


The volume and mute settings for an audio session will not persist across system restarts. For more information, see Remarks.


This constant is new in Windows 7. The sample rate of the stream is adjusted to a rate specified by an application. For more information, see Remarks.


Prevents the render stream from being included in any application loopback streams. Note that this stream will continue to be included in the endpoint loopback stream. This has no effect on Exclusive-Mode Streams. This constant is available starting with Windows 10, version 1803.


A channel matrixer and a sample rate converter are inserted as necessary to convert between the uncompressed format supplied to IAudioClient::Initialize and the audio engine mix format.


When used with AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM, a sample rate converter with better quality than the default conversion but with a higher performance cost is used. This should be used if the audio is ultimately intended to be heard by humans as opposed to other scenarios such as pumping silence or populating a meter.


The IAudioClient::Initialize method and the DIRECTX_AUDIO_ACTIVATION_PARAMS structure use the AUDCLNT_STREAMFLAGS_XXX constants.

The AUDCLNT_STREAMFLAGS_CROSSPROCESS flag indicates that the audio session for the stream is a cross-process session. A cross-process session can accept streams from more than one process. If two applications in two separate processes call IAudioClient::Initialize with identical session GUIDs, and both applications set the AUDCLNT_SHAREMODE_CROSSPROCESS flag, then the audio engine assigns their streams to the same cross-process session. This flag overrides the default behavior, which is to assign the stream to a process-specific session rather than a cross-process session. The AUDCLNT_STREAMFLAGS_CROSSPROCESS flag bit is incompatible with exclusive mode. For more information about cross-process sessions, see Audio Sessions.

The AUDCLNT_STREAMFLAGS_LOOPBACK flag enables loopback recording. In loopback recording, the audio engine copies the audio stream that is being played by a rendering endpoint device into an audio endpoint buffer so that a WASAPI client can capture the stream. If this flag is set, the IAudioClient::Initialize method attempts to open a capture buffer on the rendering device. This flag is valid only for a rendering device and only if the Initialize call sets the ShareMode parameter to AUDCLNT_SHAREMODE_SHARED. Otherwise the Initialize call will fail. If the call succeeds, the client can call the IAudioClient::GetService method to obtain an IAudioCaptureClient interface on the rendering device. For more information, see Loopback Recording.

The AUDCLNT_STREAMFLAGS_EVENTCALLBACK flag enables event-driven buffering. If a client sets this flag in the call to IAudioClient::Initialize that initializes a stream, the client must subsequently call the IAudioClient::SetEventHandle method to supply an event handle for the stream. After the stream starts, the audio engine will signal the event handle to notify the client each time a buffer becomes ready for the client to process. WASAPI supports event-driven buffering for both rendering and capture buffers. Both shared-mode and exclusive-mode streams can use event-driven buffering. For a code example that uses the AUDCLNT_STREAMFLAGS_EVENTCALLBACK flag, see Exclusive-Mode Streams.

The AUDCLNT_STREAMFLAGS_NOPERSIST flag disables persistence of the volume and mute settings for a session that contains rendering streams. By default, the volume level and muting state for a rendering session are persistent across system restarts. The volume level and muting state for a capture session are never persistent. For more information about the persistence of session volume and mute settings, see Audio Sessions.

The AUDCLNT_STREAMFLAGS_RATEADJUST flag enables an application to get a reference to the IAudioClockAdjustment interface that is used to set the sample rate for the stream. To get a pointer to this interace, an application must initialize the audio client with this flag and then call IAudioClient::GetService by specifying the IID_IAudioClockAdjustment identifier. To set the new sample rate, call IAudioClockAdjustment::SetSampleRate. This flag is valid only for a rendering device. Otherwise the GetService call fails with the error code AUDCLNT_E_WRONG_ENDPOINT_TYPE. The application must also set the ShareMode parameter to AUDCLNT_SHAREMODE_SHARED during the Initialize call. SetSampleRate fails if the audio client is not in shared mode.


Minimum supported client

Windows Vista [desktop apps | UWP apps]

Minimum supported server

Windows Server 2008 [desktop apps | UWP apps]



See also

Core Audio Constants
IAudioCaptureClient Interface