Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IAudioClient::Stop method

The Stop method stops the audio stream.

Syntax


HRESULT Stop();

Parameters

This method has no parameters.

Return value

If the method succeeds and stops the stream, it returns S_OK. If the method succeeds and the stream was already stopped, the method returns S_FALSE. If it fails, possible return codes include, but are not limited to, the values shown in the following table.

Return codeDescription
AUDCLNT_E_NOT_INITIALIZED

The client has not been successfully initialized.

AUDCLNT_E_SERVICE_NOT_RUNNING

The Windows audio service is not running.

 

Remarks

This method requires prior initialization of the IAudioClient interface. All calls to this method will fail with the error AUDCLNT_E_NOT_INITIALIZED until the client initializes the audio stream by successfully calling the IAudioClient::Initialize method.

Stop is a control method that stops a running audio stream. This method stops data from streaming through the client's connection with the audio engine. Stopping the stream freezes the stream's audio clock at its current stream position. A subsequent call to IAudioClient::Start causes the stream to resume running from that position. If necessary, the client can call the IAudioClient::Reset method to reset the position while the stream is stopped.

For code examples that call the Stop method, see the following topics:

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8

Header

Audioclient.h

See also

IAudioClient Interface
IAudioClient::Initialize
IAudioClient::Reset
IAudioClient::Start

 

 

Show:
© 2017 Microsoft