CSL  6.0
JackIO.h
Go to the documentation of this file.
1 //
2 // JackIO.h -- Driver IO object for CSL on Jack
3 // See the copyright notice and acknowledgment of authors in the file COPYRIGHT
4 //
5 
6 #ifndef CSL_JACKIO_H
7 #define CSL_JACKIO_H
8 
9 #include "CSL_Core.h"
10 
11 #include <jack/jack.h>
12 
13 namespace csl {
14 
15 //extern "C" int JackCallback (jack_nframes_t nframes, void *arg);
16 
17 ///
18 /// JackIO is an IO that uses a thread and a timer to call its graph's nextBuffer(); it doesn't do
19 /// anything with the resulting buffer, but assumes that other objects (observers of the graph)
20 /// will handle some actual IO.
21 ///
22 class JackIO : public IO {
23 public:
24  JackIO(); ///< Constructor
25  JackIO(unsigned s_rate, unsigned b_size,
26  int in_device = 0, int out_device = 0,
27  unsigned in_chans = 0, unsigned out_chans = 2);
28  virtual ~JackIO();
29 
30  void open() throw(CException); ///< open/close start/stop methods
31  void close() throw(CException);
32  void start() throw(CException); ///< start my timer thread
33  void stop() throw(CException); ///< stop the timer thread
34 
35  jack_port_t * mInput_port;
36  jack_port_t * mOutput_port;
37  jack_client_t * mClient;
38 };
39 
40 
41 } // end of namespace
42 
43 #endif CSL_JACKIO_H
44 
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
Definition: Accessor.h:17
jack_port_t * mInput_port
Definition: JackIO.h:35
JackIO()
Constructor.
Definition: JackIO.cpp:41
void close()
open/close start/stop methods
Definition: JackIO.cpp:124
JackIO is an IO that uses a thread and a timer to call its graph's nextBuffer(); it doesn't do anythi...
Definition: JackIO.h:22
jack_port_t * mOutput_port
Definition: JackIO.h:36
IO – the abstract I/O scheduling class; subclasses interface to specific I/O APIs.
Definition: CSL_Core.h:752
virtual ~JackIO()
Definition: JackIO.cpp:52
void stop()
stop the timer thread
Definition: JackIO.cpp:131
void start()
start my timer thread
Definition: JackIO.cpp:128
jack_client_t * mClient
Definition: JackIO.h:37
Base class of CSL exceptions (written upper-case). Has a string message.
void open()
open/close start/stop methods
Definition: JackIO.cpp:66