public class AudioFileInputToMemoryReasoning extends Reasoning
| Modifier and Type | Field and Description |
|---|---|
private int |
backup
The backup.
|
private byte[] |
buffer
The buffer.
|
private double[] |
chunk
The chunk.
|
(package private) int |
chunk_size
The chunk_size.
|
private long |
currentChunk
The current chunk.
|
private double |
gain
The gain.
|
(package private) AudioInputFile |
in
The in.
|
private long |
initialTime
The initial time.
|
(package private) Actuator |
mouth
The mouth.
|
(package private) Memory |
mouthMemory
The mouth memory.
|
private long |
sentChunks
The sent chunks.
|
parameters| Constructor and Description |
|---|
AudioFileInputToMemoryReasoning() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
eventHandlerRegistered(EventHandler evtHdl)
Chamado no momento em que um novo EventHandler é registrado no Agente Musical.
|
boolean |
init()
User-implemented initialization method, called by start().
|
void |
needAction(Actuator sourceActuator,
double instant,
double duration)
Chamado no caso de eventos frequentes, quando existe a necessidade de uma ação.
|
void |
newSense(Sensor sourceSensor,
double instant,
double duration)
Chamado no momento que o Agente Musical recebe um novo evento (e o raciocínio está registrado no Sensor).
|
void |
process()
Método de processamento do raciocínio.
|
void |
processCommand(Command cmd)
An user-implemented method to process a received command.
|
eventHandlerDeregistered, needAction, setWakeUp, start, stopaddParameter, addParameters, configure, finit, getAddress, getAgent, getComponentName, getComponentType, getParameter, getParameter, getParameters, getState, getType, parameterUpdate, receiveCommand, sendCommand, setAgent, setComponentName, setParameters, setState, setTypeActuator mouth
Memory mouthMemory
int chunk_size
private long currentChunk
private long initialTime
private byte[] buffer
private double[] chunk
private int backup
private double gain
private long sentChunks
AudioInputFile in
public boolean init()
LifeCycleinit in interface LifeCycleinit in class MusicalAgentComponentprotected void eventHandlerRegistered(EventHandler evtHdl)
ReasoningeventHandlerRegistered in class ReasoningevtHdl - the evt hdlpublic void needAction(Actuator sourceActuator, double instant, double duration)
ReasoningneedAction in class ReasoningsourceActuator - the source actuatorinstant - the instantduration - the durationpublic void newSense(Sensor sourceSensor, double instant, double duration)
Reasoningpublic void process()
Reasoningpublic void processCommand(Command cmd)
RouterClientprocessCommand in interface RouterClientprocessCommand in class MusicalAgentComponentcmd - the cmd