|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.beadsproject.beads.core.TimeStamp
public class TimeStamp
TimeStamps store time with respect to the current AudioContext
. Specificially, the TimeStamp stores a time step and an index into a buffer.
Field Summary | |
---|---|
AudioContext |
context
The context. |
int |
index
The index into the sample frame. |
long |
timeStep
The time step (AudioContext's count of sample frames). |
Constructor Summary | |
---|---|
TimeStamp(AudioContext context,
long timeStep,
int index)
Instantiates a new TimeStamp with the given time step, context and buffer index. |
Method Summary | |
---|---|
double |
getTimeMS()
Gets the time of the TimeStamp in milliseconds. |
long |
getTimeSamples()
Gets the time in samples. |
boolean |
isAfter(TimeStamp other)
|
boolean |
isBefore(TimeStamp other)
|
double |
since(TimeStamp oldest)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final AudioContext context
public final long timeStep
public final int index
Constructor Detail |
---|
public TimeStamp(AudioContext context, long timeStep, int index)
AudioContext.generateTimeStamp()
to generate a
TimeStamp for the current time.
context
- the AudioContext.timeStep
- the time step.index
- the index.Method Detail |
---|
public double getTimeMS()
public long getTimeSamples()
public double since(TimeStamp oldest)
public boolean isBefore(TimeStamp other)
public boolean isAfter(TimeStamp other)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |