

This parameter points to a GUID value that identifies the audio session that the stream belongs to. This parameter must point to a valid format descriptor of type WAVEFORMATEX (or WAVEFORMATEXTENSIBLE). If the AUDCLNT_STREAMFLAGS_EVENTCALLBACK stream flag is set and AUDCLNT_SHAREMODE_EXCLUSIVE is set as the ShareMode, then hnsPeriodicity must be nonzero and equal to hnsBufferDuration. To obtain the default device period, call the IAudioClient::GetDevicePeriod method. If this parameter is 0, the method sets the device period to its default value. If the requested device period lies outside the range that is set by the device's minimum period and the system's maximum period, then the method clamps the period to that range. In exclusive mode, this parameter specifies the requested scheduling period for successive buffer accesses by the audio endpoint device.

In shared mode, always set this parameter to 0. This parameter can be nonzero only in exclusive mode. For more information about buffering requirements, see Remarks. For more information about REFERENCE_TIME, see the Windows SDK documentation. If the call succeeds, the method allocates a buffer that is a least this large. This parameter contains the buffer size that the caller requests for the buffer that the audio application will share with the audio engine (in shared mode) or with the endpoint device (in exclusive mode). This parameter is of type REFERENCE_TIME and is expressed in 100-nanosecond units. The client should set this parameter to 0 or to the bitwise OR of one or more of the AUDCLNT_STREAMFLAGS_XXX Constants or the AUDCLNT_SESSIONFLAGS_XXX Constants. The client should set this parameter to one of the following AUDCLNT_SHAREMODE enumeration values:įlags to control creation of the stream. Through this parameter, the client tells the audio engine whether it wants to share the audio endpoint device with other clients. The Initialize method initializes the audio stream.

IAudioClient::Initialize method (audioclient.h)
