public class TrackPositionUpdate extends Object
| Modifier and Type | Field and Description |
|---|---|
BeatGrid |
beatGrid
The track metadata against which this update was calculated, so that if it has changed, we know to discard
the update.
|
int |
beatNumber
The beat number that was reported (or incremented) by this update.
|
boolean |
definitive
If
true, this was created in response to a beat packet, so we know exactly where the player was at that
point. |
long |
milliseconds
How far into the track has the player reached.
|
double |
pitch
The playback pitch when this update was created.
|
boolean |
playing
If
true, the player reported that it was playing when the update was received. |
boolean |
reverse
If
true, the player was playing backwards when this update was created. |
long |
timestamp
When this update was received.
|
| Constructor and Description |
|---|
TrackPositionUpdate(long timestamp,
long milliseconds,
int beatNumber,
boolean definitive,
boolean playing,
double pitch,
boolean reverse,
BeatGrid beatGrid)
Constructor simply sets the fields of this immutable value class.
|
public final long timestamp
public final long milliseconds
public final int beatNumber
public final boolean definitive
true, this was created in response to a beat packet, so we know exactly where the player was at that
point. Otherwise, we infer position based on how long has elapsed since the previous beat packet, and the
intervening playback pitch and direction.public final boolean playing
true, the player reported that it was playing when the update was received.public final double pitch
public final boolean reverse
true, the player was playing backwards when this update was created.public final BeatGrid beatGrid
public TrackPositionUpdate(long timestamp,
long milliseconds,
int beatNumber,
boolean definitive,
boolean playing,
double pitch,
boolean reverse,
BeatGrid beatGrid)
timestamp - when this update was receivedmilliseconds - how far into the track has the player reachedbeatNumber - the beat number that was reported (or incremented) by this updatedefinitive - indicates if this was based on a direct report of track position from the player (i.e. a beat)playing - indicates whether the player was actively playing a track when this update was receivedpitch - the playback pitch (where 1.0 is normal speed) when this update was receivedreverse - indicates if the player was playing backwards when this update was receivedbeatGrid - the track beat grid that was used to calculate the updateCopyright © 2016–2018 Deep Symmetry, LLC. All rights reserved.