|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jack4j.JackClient net.sf.jack4j.JackTransportClient net.sf.jack4j.AbstractJackTransportClient net.sf.jack4j.examples.TimebaseMaster
public class TimebaseMaster
Example timebase master.
This client supplies Jack transport mechanism with additional timebase information, such as bar/beat/tick numbers. Without the timebase master, other Jack clients would only get frame number information from Jack transport.
See comments in the code that describe the usage of Jack4j library.
To run the examples, you need to have the native Jack4j library in your system load path (LD_LIBRARY_PATH under Linux).
This example client expects single command line parameter - client name.
Constructor Summary | |
---|---|
TimebaseMaster(java.lang.String clientName,
boolean useExactName,
boolean canStartServer,
java.lang.String serverName)
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
|
void |
run()
Activation and main event loop. |
void |
timebaseCallback(JackTransportState state,
int nframes,
TransportPosition pos,
boolean newPos)
This callback computes the timebase information. |
Methods inherited from class net.sf.jack4j.AbstractJackTransportClient |
---|
bufferSizeCallback, clientRegistrationCallback, freewheelCallback, graphOrderCallback, portConnectCallback, portRegistrationCallback, process, sampleRateCallback, syncCallback, threadInitCallback, xRunCallback |
Methods inherited from class net.sf.jack4j.JackTransportClient |
---|
getCurrentTransportFrame, locateTransport, queryTransport, releaseTimebase, repositionTransport, setDefaultSyncCallback, setDefaultTimebaseCallback, setSyncCallback, setSyncTimeout, setTimebaseCallback, startTransport, stopTransport, unsetSyncCallback |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimebaseMaster(java.lang.String clientName, boolean useExactName, boolean canStartServer, java.lang.String serverName) throws JackException
JackException
Method Detail |
---|
public void timebaseCallback(JackTransportState state, int nframes, TransportPosition pos, boolean newPos)
It's called on the beginning of each process cycle.
timebaseCallback
in class AbstractJackTransportClient
state
- current transport statenframes
- period lengthpos
- position structure for the next cycle; if newPos is
false, the structure already contains extended positional
information from current cyclenewPos
- if true, new position was requested; in such case, pos
structure doesn't contain valid extended informationJackTransportClient.timebaseCallback(net.sf.jack4j.JackTransportState,
int, net.sf.jack4j.TransportPosition, boolean)
public void run() throws JackException, java.io.IOException
JackException
java.io.IOException
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |