IAudioClient3::GetSharedModeEnginePeriod method

Returns the range of periodicities supported by the engine for the specified stream format. The periodicity of the engine is the rate at which the engine wakes an event-driven audio client to transfer audio data to or from the engine. The values returned depend on the characteristics of the audio client as specified through a previous call to IAudioClient2::SetClientProperties.

Syntax


HRESULT GetSharedModeEnginePeriod(
  [in]  const WAVEFORMATEX *pFormat,
  [out]       UINT32       *pDefaultPeriodInFrames,
  [out]       UINT32       *pFundamentalPeriodInFrames,
  [out]       UINT32       *pMinPeriodInFrames,
  [out]       UINT32       *pMaxPeriodInFrames
);

Parameters

pFormat [in]

Type: const WAVEFORMATEX*

The stream format for which the supported periodicities are queried.

pDefaultPeriodInFrames [out]

Type: UINT32*

The default period with which the engine will wake the client for transferring audio samples

pFundamentalPeriodInFrames [out]

Type: UINT32*

The fundamental period with which the engine will wake the client for transferring audio samples. When setting the audio engine periodicity, you must use an integral multiple of this value.

pMinPeriodInFrames [out]

Type: UINT32*

The shortest period, in audio frames, with which the audio engine will wake the client for transferring audio samples.

pMaxPeriodInFrames [out]

Type: UINT32*

The longest period, in audio frames, with which the audio engine will wake the client for transferring audio samples.

Return value

Type: HRESULT

This method returns S_OK to indicate that it has completed successfully. Otherwise it returns an appropriate error code.

Remarks

Audio clients request a specific periodicity from the audio engine with the PeriodInFrames parameter to IAudioClient3::InitializeSharedAudioStream. The value of PeriodInFrames must be an integral multiple of the value returned in the pDefaultPeriodInFrames parameter. PeriodInFrames must also be greater than or equal to the value returned in pMinPeriodInFrames and less than or equal to the value of pMaxPeriodInFrames.

Requirements

Minimum supported client

Windows 10 [desktop apps only]

Minimum supported server

Windows Server 2016 [desktop apps only]

Header

Audioclient.h

See also

IAudioClient3

 

 

Show: