|
||||||||||
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.AbstractJackClient net.sf.jack4j.examples.WavRecorder
public class WavRecorder
Simple WAV recorder.
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 | |
---|---|
WavRecorder(java.lang.String clientName)
Constructor. |
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
|
int |
process(int bufferSize)
This is callback method, invoked by Jack client thread every now and then. |
void |
run()
Activation and main event loop. |
Methods inherited from class net.sf.jack4j.AbstractJackClient |
---|
bufferSizeCallback, clientRegistrationCallback, freewheelCallback, graphOrderCallback, portConnectCallback, portRegistrationCallback, sampleRateCallback, threadInitCallback, xRunCallback |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WavRecorder(java.lang.String clientName) throws java.lang.Exception
Registers under given client name, sets the callbacks and adds ports.
java.lang.Exception
Method Detail |
---|
public int process(int bufferSize) throws java.lang.Exception
This method actually works with the sound. As this client has input ports
registered, each buffer attached to input port will
contain bufferSize
samples before this method is called.
Ports were created earlier, during client initialization.
process
in class AbstractJackClient
java.lang.Exception
JackClient.process(int)
public void run() throws java.lang.Exception
java.lang.Exception
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 |