public interface RateControl extends Control
RateControlcontrols the playback rate of a
The rate defines the relationship between the
Player's media time and its
TimeBase. Rates are specified in "milli-
For example, a rate of 200'000 indicates that media
time will pass twice as fast as the
TimeBase time once the
starts. Similarly, a negative rate indicates that the
Player runs in the opposite direction of its
TimeBase, i.e. playing in reverse.
Player must support the default rate
Players that support only the default
rate must not implement this interface.
Players that support other rates besides
100'000, should implement this interface and specify the
appropriate minimum and maximum playback rates.
For audio, specific implementations may change the playback
pitch when changing the playback rate. This may be viewed as an
undesirable side-effect. See
changing pitch without changing playback rate.
|Modifier and Type||Method and Description|
Gets the maximum playback rate supported by the
Gets the minimum playback rate supported by the
Gets the current playback rate.
Sets the playback rate.
int setRate(int millirate)
setRate method returns the actual rate set by the
Player should set their rate
as close to the requested
value as possible, but are not required to set the rate to the exact
value of any argument other than 100'000. A
is only guaranteed to set
its rate exactly to 100'000.
If the given rate is less than
or greater than
the rate will be adjusted to the minimum or maximum
supported rate respectively.
Player is already
setRate will immediately take effect.
millirate- The playback rate to set. The rate is given in a "milli-percentage" value.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Use is subject to License Terms. Your use of this web site or any of its contents or software indicates your agreement to be bound by these License Terms.