JackMidiRawOutputWriteQueue.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 __JackMidiRawOutputWriteQueue__
#define __JackMidiRawOutputWriteQueue__
#include "JackMidiAsyncQueue.h"
#include "JackMidiSendQueue.h"
namespace Jack {
class SERVER_EXPORT JackMidiRawOutputWriteQueue:
public JackMidiWriteQueue {
private:
jack_midi_event_t *non_rt_event;
jack_nframes_t non_rt_event_time;
JackMidiAsyncQueue *non_rt_queue;
jack_midi_event_t *rt_event;
jack_nframes_t rt_event_time;
JackMidiAsyncQueue *rt_queue;
jack_midi_data_t running_status;
JackMidiSendQueue *send_queue;
void
DequeueNonRealtimeEvent();
void
DequeueRealtimeEvent();
bool
SendByte(jack_nframes_t time, jack_midi_data_t byte);
bool
SendNonRTBytes(jack_nframes_t boundary_frame);
protected:
virtual void
HandleWriteQueueBug(jack_nframes_t time, jack_midi_data_t byte);
public:
using JackMidiWriteQueue::EnqueueEvent;
JackMidiRawOutputWriteQueue(JackMidiSendQueue *send_queue,
size_t non_rt_size=4096,
size_t max_non_rt_messages=1024,
size_t max_rt_messages=128);
~JackMidiRawOutputWriteQueue();
EnqueueResult
EnqueueEvent(jack_nframes_t time, size_t size,
jack_midi_data_t *buffer);
jack_nframes_t
Process(jack_nframes_t boundary_frame=0);
};
}
#endif
Jack::JackMidiAsyncQueue
Definition: JackMidiAsyncQueue.h:40
Jack
Definition: JackAC3Encoder.cpp:30
Jack::JackMidiWriteQueue
Definition: JackMidiWriteQueue.h:32
jack_midi_event_t
Definition: JackMidiPort.h:33
Jack::JackMidiWriteQueue::EnqueueEvent
virtual EnqueueResult EnqueueEvent(jack_nframes_t time, size_t size, jack_midi_data_t *buffer)=0
Jack::JackMidiSendQueue
Definition: JackMidiSendQueue.h:31
Jack::JackMidiRawOutputWriteQueue
Definition: JackMidiRawOutputWriteQueue.h:46