JackMidiWriteQueue.h
/*
Copyright (C) 2010 Devin Anderson
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __JackMidiWriteQueue__
#define __JackMidiWriteQueue__
#include "JackMidiPort.h"
namespace Jack {
class SERVER_EXPORT JackMidiWriteQueue {
public:
enum EnqueueResult {
BUFFER_FULL,
BUFFER_TOO_SMALL,
EVENT_EARLY,
EN_ERROR,
OK
};
virtual ~JackMidiWriteQueue();
virtual EnqueueResult
EnqueueEvent(jack_nframes_t time, size_t size,
jack_midi_data_t *buffer) = 0;
inline EnqueueResult
EnqueueEvent(jack_midi_event_t *event, jack_nframes_t frame_offset=0)
{
return EnqueueEvent(event->time + frame_offset, event->size,
event->buffer);
}
};
}
#endif
jack_midi_event_t::buffer
jack_midi_data_t * buffer
Definition: JackMidiPort.h:37
Jack
Definition: JackAC3Encoder.cpp:30
Jack::JackMidiWriteQueue
Definition: JackMidiWriteQueue.h:32
jack_midi_event_t::size
size_t size
Definition: JackMidiPort.h:36
jack_midi_event_t
Definition: JackMidiPort.h:33
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