public final class PlaybackParameters extends Object
Modifier and Type | Field and Description |
---|---|
static PlaybackParameters |
DEFAULT
The default playback parameters: real-time playback with no pitch modification or silence
skipping.
|
float |
pitch
The factor by which the audio pitch will be scaled.
|
boolean |
skipSilence
Whether to skip silence in the input.
|
float |
speed
The factor by which playback will be sped up.
|
Constructor and Description |
---|
PlaybackParameters(float speed)
Creates new playback parameters that set the playback speed.
|
PlaybackParameters(float speed,
float pitch)
Creates new playback parameters that set the playback speed and audio pitch scaling factor.
|
PlaybackParameters(float speed,
float pitch,
boolean skipSilence)
Creates new playback parameters that set the playback speed, audio pitch scaling factor and
whether to skip silence in the audio stream.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
long |
getMediaTimeUsForPlayoutTimeMs(long timeMs)
Returns the media time in microseconds that will elapse in
timeMs milliseconds of
wallclock time. |
int |
hashCode() |
public static final PlaybackParameters DEFAULT
public final float speed
public final float pitch
public final boolean skipSilence
public PlaybackParameters(float speed)
speed
- The factor by which playback will be sped up. Must be greater than zero.public PlaybackParameters(float speed, float pitch)
speed
- The factor by which playback will be sped up. Must be greater than zero.pitch
- The factor by which the audio pitch will be scaled. Must be greater than zero.public PlaybackParameters(float speed, float pitch, boolean skipSilence)
speed
- The factor by which playback will be sped up. Must be greater than zero.pitch
- The factor by which the audio pitch will be scaled. Must be greater than zero.skipSilence
- Whether to skip silences in the audio stream.