org.tritonus.midi.device.alsa
Class AlsaMidiIn
java.lang.Object
java.lang.Thread
org.tritonus.midi.device.alsa.AlsaMidiIn
- All Implemented Interfaces:
- Runnable
- public class AlsaMidiIn
- extends Thread
Handles input from an ALSA port.
Constructor Summary |
AlsaMidiIn(AlsaSeq alsaSeq,
int nDestPort,
int nSourceClient,
int nSourcePort,
AlsaMidiIn.AlsaMidiInListener listener)
Receives events without timestamping them. |
AlsaMidiIn(AlsaSeq alsaSeq,
int nDestPort,
int nSourceClient,
int nSourcePort,
int nTimestampingQueue,
boolean bRealtime,
AlsaMidiIn.AlsaMidiInListener listener)
Does establish a subscription where events are routed through
a queue to get a timestamp. |
Method Summary |
void |
run()
The working part of the class. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, 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 |
AlsaMidiIn
public AlsaMidiIn(AlsaSeq alsaSeq,
int nDestPort,
int nSourceClient,
int nSourcePort,
AlsaMidiIn.AlsaMidiInListener listener)
- Receives events without timestamping them.
Does establish a subscription where events are routed directely
(not getting a timestamp).
- Parameters:
alsaSeq
- The client that should be used to receive
events.nDestPort
- The port number that should be used to receive
events. This port has to exist on the client represented by
alsaSeq.nSourceClient
- The client number that should be listened
to. This and nSourcePort must exist prior to calling this
constructor. The port has to allow read subscriptions.nSourcePort
- The port number that should be listened
to. This and nSourceClient must exist prior to calling this
constructor. The port has to allow read subscriptions.listener
- The listener that should receive the
MidiMessage objects created here from received events.
AlsaMidiIn
public AlsaMidiIn(AlsaSeq alsaSeq,
int nDestPort,
int nSourceClient,
int nSourcePort,
int nTimestampingQueue,
boolean bRealtime,
AlsaMidiIn.AlsaMidiInListener listener)
- Does establish a subscription where events are routed through
a queue to get a timestamp.
run
public void run()
- The working part of the class.
Here, the thread repeats in blocking in a call to
getEvent() and calling the listener's
dequeueEvent() method.
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread