Jack2
1.9.8
|
00001 /* 00002 Copyright (C) 2010 Devin Anderson 00003 00004 This program is free software; you can redistribute it and/or modify 00005 it under the terms of the GNU Lesser General Public License as published by 00006 the Free Software Foundation; either version 2.1 of the License, or 00007 (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU Lesser General Public License for more details. 00013 00014 You should have received a copy of the GNU Lesser General Public License 00015 along with this program; if not, write to the Free Software 00016 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 00018 */ 00019 00020 #ifndef __JackMidiWriteQueue__ 00021 #define __JackMidiWriteQueue__ 00022 00023 #include "JackMidiPort.h" 00024 00025 namespace Jack { 00026 00032 class SERVER_EXPORT JackMidiWriteQueue { 00033 00034 public: 00035 00036 enum EnqueueResult { 00037 BUFFER_FULL, 00038 BUFFER_TOO_SMALL, 00039 EVENT_EARLY, 00040 EN_ERROR, 00041 OK 00042 }; 00043 00044 virtual ~JackMidiWriteQueue(); 00045 00061 virtual EnqueueResult 00062 EnqueueEvent(jack_nframes_t time, size_t size, 00063 jack_midi_data_t *buffer) = 0; 00064 00071 inline EnqueueResult 00072 EnqueueEvent(jack_midi_event_t *event, jack_nframes_t frame_offset=0) 00073 { 00074 return EnqueueEvent(event->time + frame_offset, event->size, 00075 event->buffer); 00076 } 00077 00078 }; 00079 00080 } 00081 00082 #endif