Share via


Windows Media Player 11 SDK IWMPSettings::put_rate 

Windows Media Player SDK banner art

Previous Next

IWMPSettings::put_rate

The put_rate method specifies the current playback rate for video.

Syntax

  

Parameters

dRate

[in]  double containing the rate with a default value of 1.0.

Return Values

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK The method succeeded.

Remarks

The value retrieved by this method acts as a multiplier value that enables you to play a media item at a faster or slower rate. The default value of 1.0 indicates the authored speed.

Note that an audio track becomes difficult to understand at rates lower than 0.5 or higher than 1.5. A playback rate of 2 equates to twice the normal playback speed.

Windows Media Player will attempt to use the most effective of the following four different playback modes

  • Smooth video playback with audio pitch maintained
  • Smooth video playback with audio pitch not maintained
  • Smooth video playback with no audio
  • Keyframe video playback with no audio

The mode chosen by Windows Media Player depends on numerous factors including file type and location, operating system, network, and server.

Other considerations apply as well, depending on the digital media format used to create the content:

  • Windows Media Video (WMV) and ASF. Optimal values for this property are from 1 to 10, or from –1 to –10 for reverse play. Values from 0.5 to 1.0 or from -0.5 to -1.0 may also work well in cases where audio pitch can be maintained, such as when playing files located on the local computer. Values with an absolute magnitude greater than 10 are allowed, but are not very meaningful.
  • Other video formats. This property can range from 0 to 9. Negative values are not allowed. Values less than 1 represent slow motion. Values above 9 are allowed, but are not very meaningful.

The IWMPControls::fastForward method changes the value retrieved by get_rate to 5.0, while the IWMPControls::fastReverse method changes the value retrieved by get_rate to –5.0.

The playback rate of some digital media formats cannot be altered. Use the IWMPSettings::get_isAvailable method to determine whether this property can be specified for a particular media item.

Windows Media Player 10 Mobile: This method only accepts a long set to -5.0, 1.0, or 5.0. Otherwise, E_INVALIDARG is returned.

Requirements

Version: Windows Media Player 9 Series or later.

Header: Include wmp.h.

Library: Use wmp.dll.

See Also

Previous Next