ISpatialAudioObjectRenderStreamBase::Stop method (spatialaudioclient.h)

Stops a running audio stream.

Syntax

HRESULT Stop();

Return value

If the method succeeds, it returns S_OK. If it fails, possible return codes include, but are not limited to, the values shown in the following table.

Return code Description
SPTLAUDCLNT_E_DESTROYED
The ISpatialAudioClient associated with the spatial audio stream has been destroyed.
AUDCLNT_E_DEVICE_INVALIDATED
The audio endpoint device has been unplugged, or the audio hardware or associated hardware resources have been reconfigured, disabled, removed, or otherwise made unavailable for use.
SPTLAUDCLNT_E_INTERNAL
An internal error has occurred.
AUDCLNT_E_UNSUPPORTED_FORMAT
The media associated with the spatial audio stream uses an unsupported format.

Remarks

Stopping stream causes data to stop flowing between the endpoint buffer and the audio engine.
You can consider this operation to pause the stream because it leaves the stream's audio clock at its current stream position and does not reset it to 0. A subsequent call to Start causes the stream to resume running from the current position.
Call Reset to reset the clock position to 0 and cause all active ISpatialAudioObject instances to be revoked.

Requirements

Requirement Value
Target Platform Windows
Header spatialaudioclient.h

See also

ISpatialAudioObjectRenderStream

ISpatialAudioObjectRenderStreamBase