public final class PlaybackParameters
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static PlaybackParameters |
DEFAULT
The default playback parameters: real-time playback with no pitch modification.
|
float |
pitch
The factor by which the audio pitch will be scaled.
|
float |
speed
The factor by which playback will be sped up.
|
| Constructor and Description |
|---|
PlaybackParameters(float speed,
float pitch)
Creates new playback parameters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
long |
getSpeedAdjustedDurationUs(long timeMs)
Scales the millisecond duration
timeMs by the playback speed, returning the result in
microseconds. |
int |
hashCode() |
public static final PlaybackParameters DEFAULT
public final float speed
public final float pitch
public PlaybackParameters(float speed,
float pitch)
speed - The factor by which playback will be sped up.pitch - The factor by which the audio pitch will be scaled.public long getSpeedAdjustedDurationUs(long timeMs)
timeMs by the playback speed, returning the result in
microseconds.timeMs - The time to scale, in milliseconds.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object