Jack2: JackMidiDriver.h Source File

Jack2 1.9.12

JackMidiDriver.h
1 /*
2 Copyright (C) 2009 Grame
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19
20 #ifndef __JackMidiDriver__
21 #define __JackMidiDriver__
22
23 #include "JackDriver.h"
24 #include "JackMidiPort.h"
25 #include "JackLockedEngine.h"
26 #include "ringbuffer.h"
27
28 namespace Jack
29 {
30
39 class SERVER_EXPORT JackMidiDriver : public JackDriver
40 {
41
42 protected:
43
44 JackMidiBuffer* GetInputBuffer(int port_index);
45 JackMidiBuffer* GetOutputBuffer(int port_index);
46
47 virtual int ProcessReadSync();
48 virtual int ProcessWriteSync();
49
50 virtual int ProcessReadAsync();
51 virtual int ProcessWriteAsync();
52
53 virtual void UpdateLatencies();
54
55 public:
56
57 JackMidiDriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table);
58 virtual ~JackMidiDriver();
59
60 virtual int Open(bool capturing,
61 bool playing,
62 int inchannels,
63 int outchannels,
64 bool monitor,
65 const char* capture_driver_name,
66 const char* playback_driver_name,
67 jack_nframes_t capture_latency,
68 jack_nframes_t playback_latency);
69
70 virtual int SetBufferSize(jack_nframes_t buffer_size);
71
72 virtual int Attach();
73 virtual int Detach();
74
75 };
76
77 } // end of namespace
78
79 #endif
Jack::JackPosixSemaphore
Inter process synchronization using POSIX semaphore.
Definition: JackPosixSemaphore.h:36
ringbuffer.h
Jack::JackMidiDriver
The base class for MIDI drivers: drivers with MIDI ports.
Definition: JackMidiDriver.h:39
Jack::JackDriver
Definition: JackDriver.h:127
Jack::JackMidiBuffer
Definition: JackMidiPort.h:75
Jack::JackLockedEngine
Locked Engine, access to methods is serialized using a mutex.
Definition: JackLockedEngine.h:78