IAudioRenderer::SetDriftRate
A version of this page is also available for
4/8/2010
This method compensates for drifts in the clock rate when streaming live content that is not seekable or scannable.
Syntax
IAudioRenderer::SetDriftRate(
DOUBLE dwRate
)
Parameters
- dwRate
[in] A DOUBLE value that identifies the drift rate of the clock as a fraction of the baseline rate for the audio renderer. The value 1.0 is equivalent to the normal playback rate. Values less than 1.0 cause playback to slow and values greater than 1.0 cause playback to speed up. For example, if a call to IMediaSeeking::SetRate sets the playback rate to 2.0, a call to IAudioRenderer::SetDriftRate with a dwRate value of 1.1 will cause the actual playback rate to be 2.2.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. The following table shows some possible return values.
Value | Description |
---|---|
E_FAIL |
Failure. |
S_OK |
Success. |
Remarks
Calls to IMediaSeeking::SetRate establish the playback rate for local media on the Windows Embedded CE device. Media that is streamed from an external source is affected by both the playback rate of the Windows Embedded CE device and the playback rate of the media server. If these two playback rates are not the same, audio content can drift and lose synchronization over time. By using the IAudioRenderer::SetDriftRate method, you can match the ultimate playback rate of the audio renderer with the playback rate of the media server.
All audio renderers for DirectShow must support this method.
Requirements
Windows Embedded CE | Windows CE 5.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
Note | Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements For more information, see Setting Up the Build Environment |