| Modifier and Type | Field and Description |
|---|---|
private double[] |
buffer
The buffer.
|
private double |
EPSILON
The epsilon.
|
private int |
halfSamples
The half samples.
|
private double |
instantBegin
The instant begin.
|
private double |
instantEnd
The instant end.
|
private java.lang.String |
MEMORY_TYPE
The memory type.
|
private boolean |
overwrite
The overwrite.
|
private java.lang.String |
PARAM_OVERWRITE
The param overwrite.
|
private double |
period
The period.
|
private long |
ptrAbsolutZero
The ptr absolut zero.
|
private int |
ptrBegin
The ptr begin.
|
private int |
ptrEnd
The ptr end.
|
private int |
ptrNow
The ptr now.
|
private int |
samples
The samples.
|
private double |
startTime
The start time.
|
private double |
step
The step.
|
| Constructor and Description |
|---|
AudioMemory() |
| Modifier and Type | Method and Description |
|---|---|
double |
getFirstInstant()
Retorna o instante mais antigo em que existe informação na memória.
|
double |
getLastInstant()
Retorna o último instante em que existe informação na memória.
|
private java.lang.Object |
getNow(TimeUnit unit)
Retorna o instante atual, para ser utilizado na leitura/escrita relativa.
|
boolean |
init()
User-implemented initialization method, called by start().
|
java.lang.Object |
readMemory(double instant,
double duration,
TimeUnit unit)
Obtém a memória em um dado intervalo de tempo.
|
java.lang.Object |
readMemory(double instant,
TimeUnit unit)
Obtém a memória em um instante do tempo.
|
void |
resetMemory()
Limpa a memória.
|
private static double |
round(double number,
int decimalPlaces)
Round.
|
private void |
updateMemory()
Update memory.
|
void |
writeMemory(java.lang.Object object)
Write memory.
|
void |
writeMemory(java.lang.Object object,
double instant,
double duration,
TimeUnit unit)
Escreve na memória a partir de um instante absoluto.
|
void |
writeMemory(java.lang.Object object,
double instant,
TimeUnit unit)
Write memory.
|
configure, finit, getFuture, getName, getParameters, getPast, parameterUpdate, setAgent, setParameters, start, stopprivate final double EPSILON
private final java.lang.String MEMORY_TYPE
private final java.lang.String PARAM_OVERWRITE
private double step
private double startTime
private double period
private boolean overwrite
private int samples
private int halfSamples
private int ptrBegin
private long ptrAbsolutZero
private int ptrNow
private int ptrEnd
private double instantBegin
private double instantEnd
private double[] buffer
public boolean init()
LifeCyclepublic double getFirstInstant()
MemorygetFirstInstant in class Memorypublic double getLastInstant()
MemorygetLastInstant in class Memoryprivate static double round(double number,
int decimalPlaces)
number - the numberdecimalPlaces - the decimal placesprivate java.lang.Object getNow(TimeUnit unit)
unit - the unitprivate void updateMemory()
public java.lang.Object readMemory(double instant,
TimeUnit unit)
MemoryreadMemory in class Memoryinstant - the instantunit - the unitpublic java.lang.Object readMemory(double instant,
double duration,
TimeUnit unit)
MemoryreadMemory in class Memoryinstant - the instantduration - the durationunit - the unitpublic void resetMemory()
MemoryresetMemory in class Memorypublic void writeMemory(java.lang.Object object,
double instant,
double duration,
TimeUnit unit)
throws MemoryException
MemorywriteMemory in class Memoryobject - the objectinstant - the instantduration - the durationunit - the unitMemoryException - the memory exceptionpublic void writeMemory(java.lang.Object object,
double instant,
TimeUnit unit)
throws MemoryException
MemorywriteMemory in class Memoryobject - the objectinstant - the instantunit - the unitMemoryException - the memory exceptionpublic void writeMemory(java.lang.Object object)
throws MemoryException
MemorywriteMemory in class Memoryobject - the objectMemoryException - the memory exception