Rate

Sets or retrieves a value specifying the clip's playback rate.

Compatibility: Windows Media Player, ActiveMovie

MediaPlayer.Rate [ = dblRate ]

Parameters

  • dblRate
    Double value specifying the clip's playback rate. This property is read/write with a default value of 1.0.

Remarks

This property acts as a multiplier value that allows you to play the clip at a faster or slower rate. The default value of 1.0 indicates the authored speed. Note that the 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.

Other considerations apply as well, depending on media type:

  • Advanced streaming format (ASF): Optimal values for this property are from 1 to 10 or from –1 to –10. Values with an absolute magnitude greater than 10 are allowed, but not very meaningful. Audio plays only when the value is 1. An ASF file must be stopped and the AllowScan property must be true before you can set the Rate property. Negative values for this property indicate reversed playback. This property applies only to files that meet the same conditions as stated in the section describing the CanScan property.

Other Media Types: Setting this property at run time is similar to performing a seek operation, and changes the position to the specified point in the clip. The new value must be within the range specified by the SelectionStart and SelectionEnd properties.

The Play, Pause, and Stop methods all reset this property to the default (1.0). As a result, you must set this property while playback is underway, and must reset it to its new value after every pause/unpause or stop/restart.

See Also

Playback Methods and Properties

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.