Jack2: JackMidiWriteQueue.h Source File

Jack2 1.9.12

JackMidiWriteQueue.h
1 /*
2 Copyright (C) 2010 Devin Anderson
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18 */
19
20 #ifndef __JackMidiWriteQueue__
21 #define __JackMidiWriteQueue__
22
23 #include "JackMidiPort.h"
24
25 namespace Jack {
26
32 class SERVER_EXPORT JackMidiWriteQueue {
33
34 public:
35
36 enum EnqueueResult {
37 BUFFER_FULL,
38 BUFFER_TOO_SMALL,
39 EVENT_EARLY,
40 EN_ERROR,
41 OK
42 };
43
44 virtual ~JackMidiWriteQueue();
45
61 virtual EnqueueResult
62 EnqueueEvent(jack_nframes_t time, size_t size,
63 jack_midi_data_t *buffer) = 0;
64
71 inline EnqueueResult
72 EnqueueEvent(jack_midi_event_t *event, jack_nframes_t frame_offset=0)
73 {
74 return EnqueueEvent(event->time + frame_offset, event->size,
75 event->buffer);
76 }
77
78 };
79
80 }
81
82 #endif
jack_midi_event_t
Definition: JackMidiPort.h:33
jack_midi_event_t::size
size_t size
Definition: JackMidiPort.h:36
jack_midi_event_t::buffer
jack_midi_data_t * buffer
Definition: JackMidiPort.h:37
jack_midi_event_t::time
jack_nframes_t time
Definition: JackMidiPort.h:35
Jack::JackMidiWriteQueue::EnqueueEvent
EnqueueResult EnqueueEvent(jack_midi_event_t *event, jack_nframes_t frame_offset=0)
Definition: JackMidiWriteQueue.h:72
Jack::JackMidiWriteQueue
Definition: JackMidiWriteQueue.h:32