Jack2 1.9.12

JackFreebobDriver.h
1 /*
2 Copyright (C) 2001 Paul Davis
3 Copyright (C) 2004 Grame
4 Copyright (C) 2007 Pieter Palmers
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
20 */
21
22 #ifndef __JackFreebobDriver__
23 #define __JackFreebobDriver__
24
25 #include "JackAudioDriver.h"
26 #include "JackThreadedDriver.h"
27 #include "JackTime.h"
28
29 #include "freebob_driver.h"
30
31 namespace Jack
32 {
33
38 class JackFreebobDriver : public JackAudioDriver
39 {
40
41 private:
42
43 // enable verbose messages
44 int g_verbose;
45
46 jack_driver_t* fDriver;
47 int freebob_driver_attach (freebob_driver_t *driver);
48 int freebob_driver_detach (freebob_driver_t *driver);
49 int freebob_driver_read (freebob_driver_t * driver, jack_nframes_t nframes);
50 int freebob_driver_write (freebob_driver_t * driver, jack_nframes_t nframes);
51 jack_nframes_t freebob_driver_wait (freebob_driver_t *driver,
52 int extra_fd, int *status,
53 float *delayed_usecs);
54 int freebob_driver_start (freebob_driver_t *driver);
55 int freebob_driver_stop (freebob_driver_t *driver);
56 int freebob_driver_restart (freebob_driver_t *driver);
57 freebob_driver_t *freebob_driver_new (char *name, freebob_jack_settings_t *params);
58 void freebob_driver_delete (freebob_driver_t *driver);
59
60 #ifdef FREEBOB_DRIVER_WITH_MIDI
61 freebob_driver_midi_handle_t *freebob_driver_midi_init(freebob_driver_t *driver);
62 void freebob_driver_midi_finish (freebob_driver_midi_handle_t *m);
63 int freebob_driver_midi_start (freebob_driver_midi_handle_t *m);
64 int freebob_driver_midi_stop (freebob_driver_midi_handle_t *m);
65 #endif
66
67 void jack_driver_init (jack_driver_t *driver);
68 void jack_driver_nt_init (jack_driver_nt_t * driver);
69
70 public:
71
72 JackFreebobDriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table)
73 :JackAudioDriver(name, alias, engine, table)
74 {}
75 virtual ~JackFreebobDriver()
76 {}
77
78 int Open(freebob_jack_settings_t *cmlparams);
79
80 int Close();
81 int Attach();
82 int Detach();
83
84 int Start();
85 int Stop();
86
87 int Read();
88 int Write();
89
90 int SetBufferSize(jack_nframes_t nframes);
91 };
92
93 } // end of namespace
94
95 #endif
Jack::JackLockedEngine
Locked Engine, access to methods is serialized using a mutex.
Definition: JackLockedEngine.h:78
Jack::JackPosixSemaphore
Inter process synchronization using POSIX semaphore.
Definition: JackPosixSemaphore.h:36
_jack_driver_nt
Definition: driver.h:275
Jack::JackFreebobDriver
The FreeBoB driver.
Definition: JackFreebobDriver.h:38
_jack_driver
Definition: driver.h:87
Jack::JackAudioDriver
The base class for audio drivers: drivers with audio ports.
Definition: JackAudioDriver.h:42
_freebob_jack_settings
Definition: freebob_driver.h:134
_freebob_driver
Definition: freebob_driver.h:199