|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread net.sourceforge.geeboss.controller.thread.MidiThread
public class MidiThread
Thread responsible of handling midi comunication
Nested Class Summary | |
---|---|
static class |
MidiThread.StampedMidiMesasge
Inner class used to add the waitForAck status to the midi event |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
MidiThread(GeebossContainer container)
Create a new Midi thread |
Method Summary | |
---|---|
void |
close()
|
javax.sound.midi.Receiver |
getReceiver()
Get the receiver wrapper |
void |
run()
|
void |
send(javax.sound.midi.MidiMessage message,
long timeStamp)
Send a message to the output port if any is connected |
void |
send(javax.sound.midi.MidiMessage message,
long timeStamp,
boolean waitForAck)
Send a message to the output port if any is connected |
void |
setInputPort(javax.sound.midi.MidiDevice inputPort)
Setter for input port |
void |
setOutputPort(javax.sound.midi.MidiDevice outputPort)
Setter for output port |
void |
setReceiver(javax.sound.midi.Receiver receiver)
Set the receiver that will get the input port messages |
void |
startThread()
Start the Midi Thread |
void |
stopThread()
Stop the Midi Thread |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MidiThread(GeebossContainer container)
container
- the containerMethod Detail |
---|
public void setInputPort(javax.sound.midi.MidiDevice inputPort)
inputPort
- the input portpublic void setOutputPort(javax.sound.midi.MidiDevice outputPort)
outputPort
- the output portpublic void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
Thread.run()
public void startThread()
public void stopThread()
public void close()
close
in interface javax.sound.midi.Receiver
close
in interface javax.sound.midi.Transmitter
public void send(javax.sound.midi.MidiMessage message, long timeStamp)
send
in interface javax.sound.midi.Receiver
public void send(javax.sound.midi.MidiMessage message, long timeStamp, boolean waitForAck)
waitForAck
- if true wait for data from the device before sending another messagepublic void setReceiver(javax.sound.midi.Receiver receiver)
setReceiver
in interface javax.sound.midi.Transmitter
public javax.sound.midi.Receiver getReceiver()
getReceiver
in interface javax.sound.midi.Transmitter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |