|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.gulden.framework.jjack.JJackSystem
public class JJackSystem
JJack system class.
This purely static class is the bridge between the native JACK client
and the Java classes implementing JJackAudioProcessor
.
Field Summary | |
---|---|
private static JJackAudioProcessor |
client
|
private static java.lang.String |
clientName
|
static boolean |
DEBUG
Flag for debug mode. |
private static java.lang.String |
DEFAULT_AUTOCONNECT
Default auto-connect mode. |
private static java.lang.String |
DEFAULT_CLIENT_NAME
Default name of the native JACK client to register. |
private static java.lang.String |
DEFAULT_PORTS
Default ports count. |
private static java.lang.String |
DEFAULT_VERBOSE
Default verbose mode. |
private static long |
infPointer
Pointer to native handle-structure. |
private static JJackException |
initError
|
private static boolean |
initialized
|
private static java.lang.Object |
lock
|
private static int |
portsInput
|
private static boolean |
portsInputAutoconnect
|
private static int |
portsOutput
|
private static boolean |
portsOutputAutoconnect
|
private static java.lang.String |
PROPERTY_CLIENT_NAME
Name of the system property specifying the name of the native JACK client to register. |
private static java.lang.String |
PROPERTY_PORTS
Name of the system property specifying how many ports to allocate. |
private static java.lang.String |
PROPERTY_VERBOSE
Name of the system property specifying whether JJack should give more verbose output. |
private static boolean |
running
|
private static java.lang.String |
SUFFIX_AUTOCONNECT
Suffix of the system property specifying whether ports should be auto-connected to physical JACK ports. |
private static java.lang.String |
SUFFIX_INPUT
Additional suffix of the system property specifying how many input ports to allocate. |
private static java.lang.String |
SUFFIX_OUTPUT
Suffix of the system property specifying how many output ports to allocate. |
private static boolean |
verbose
|
static java.lang.String |
VERSION
JJack version number. |
Fields inherited from interface de.gulden.framework.jjack.JJackConstants |
---|
INPUT, LEFT, OUTPUT, RIGHT |
Constructor Summary | |
---|---|
private |
JJackSystem()
Private constructor for getting an instance of Runnable. |
Method Summary | |
---|---|
static int |
calculateSampleCount(int milliseconds)
Calculates number of samples used for a single channel in the given amount of milliseconds. |
static int |
countPorts(int inout)
Returns the number of ports available either for input or output mode. |
static java.lang.String |
getInfo()
Returns a short information text about the JJack system and its current status. |
static java.lang.String |
getJackClientName()
Returns the name of the native JACK client that has been regstered by the JJack system. |
static JJackAudioProcessor |
getProcessor()
Returns the audio processor which is responsible for signal processing. |
static int |
getSampleRate()
Returns the sample rate used by the JACK daemon. |
private static void |
init()
Initialized the JJack system. |
(package private) static void |
init1()
|
static boolean |
isInitialized()
|
static void |
log(java.lang.Object src,
java.lang.String msg)
Logs a message from the specified source object, if verbose mode is enabled. |
static void |
main(java.lang.String[] args)
Wrapper main()-method, invokes the main()-method of the class specified as arg[0]. |
private static void |
nativeDestroy()
Native client shutdown. |
private static void |
nativeInit()
Native initialization. |
private static void |
nativeStart()
Native client start. |
static void |
process(JJackAudioProcessor p,
JJackAudioEvent e)
Process an audio event by a given audio processor. |
private static void |
processBytes(java.nio.ByteBuffer[] in,
java.nio.ByteBuffer[] out)
This method is the actual bridge from JACK to Java. |
static void |
setProcessor(JJackAudioProcessor cl)
Sets the audio processor which is responsible for signal processing. |
static void |
shutdown()
|
private static void |
start()
Start background processing on the Java side. |
private static void |
stop()
Stops background processing on the Java side. |
private static void |
usage()
Output usage description, then exit with error code. |
static boolean |
verbose()
Returns whether the JJack sytem runs in verbose mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VERSION
public static final boolean DEBUG
private static final java.lang.String PROPERTY_CLIENT_NAME
private static final java.lang.String DEFAULT_CLIENT_NAME
private static final java.lang.String PROPERTY_VERBOSE
private static final java.lang.String DEFAULT_VERBOSE
private static final java.lang.String PROPERTY_PORTS
private static final java.lang.String SUFFIX_INPUT
private static final java.lang.String SUFFIX_OUTPUT
private static final java.lang.String DEFAULT_PORTS
private static final java.lang.String SUFFIX_AUTOCONNECT
private static final java.lang.String DEFAULT_AUTOCONNECT
private static java.lang.String clientName
private static int portsInput
private static int portsOutput
private static boolean portsInputAutoconnect
private static boolean portsOutputAutoconnect
private static JJackAudioProcessor client
private static JJackException initError
private static boolean initialized
private static boolean running
private static boolean verbose
private static java.lang.Object lock
private static long infPointer
libjjack.so
in file libjjack.c.
Constructor Detail |
---|
private JJackSystem()
Method Detail |
---|
public static int getSampleRate()
public static void setProcessor(JJackAudioProcessor cl)
process()
-method of this audio processor will then regularly be called.
public static JJackAudioProcessor getProcessor()
public static void main(java.lang.String[] args) throws java.lang.Throwable
args
- command line parameters
java.lang.Throwable
- if an unhandled exception occurs inside the wrapped application,
or a JJackException if initializing the Jack client was not successful.public static void shutdown() throws JJackException
JJackException
public static java.lang.String getJackClientName()
public static int countPorts(int inout)
inout
- either constant INPUT
or OUTPUT
public static boolean verbose()
public static void log(java.lang.Object src, java.lang.String msg)
src
- the source object, usually the originator of the log messagemsg
- the message textpublic static int calculateSampleCount(int milliseconds)
public static void process(JJackAudioProcessor p, JJackAudioEvent e)
p
- the audio processor that is to process the evente
- the audio eventpublic static java.lang.String getInfo()
public static boolean isInitialized()
static void init1()
private static void usage()
private static void nativeInit() throws JJackException
JJackException
private static void nativeStart() throws JJackException
JJackException
private static void nativeDestroy() throws JJackException
JJackException
private static void init() throws JJackException
JJackException
private static void start() throws JJackException
JJackException
- if an error occursprivate static void stop()
private static void processBytes(java.nio.ByteBuffer[] in, java.nio.ByteBuffer[] out)
in
- the direct memory access input bufferout
- the direct memory access output buffer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |