Jack2  1.9.10
Public Member Functions
Jack::JackMidiAsyncWaitQueue Class Reference

#include <JackMidiAsyncWaitQueue.h>

Inheritance diagram for Jack::JackMidiAsyncWaitQueue:
Jack::JackMidiAsyncQueue Jack::JackMidiReadQueue Jack::JackMidiWriteQueue

List of all members.

Public Member Functions

 JackMidiAsyncWaitQueue (size_t max_bytes=4096, size_t max_messages=1024)
jack_midi_event_tDequeueEvent ()
jack_midi_event_tDequeueEvent (long usecs)
jack_midi_event_tDequeueEvent (jack_nframes_t frame)
EnqueueResult EnqueueEvent (jack_nframes_t time, size_t size, jack_midi_data_t *buffer)

Detailed Description

This is an asynchronous wait queue that allows a thread to wait for a message, either indefinitely or for a specified time. This is one example of a way that the `JackMidiAsyncQueue` class can be extended so that process threads can interact with non-process threads to send MIDI events.

XXX: As of right now, this code hasn't been tested. Also, note the warning in the JackMidiAsyncWaitQueue.cpp about semaphore wait resolution.

Definition at line 39 of file JackMidiAsyncWaitQueue.h.


Constructor & Destructor Documentation

JackMidiAsyncWaitQueue::JackMidiAsyncWaitQueue ( size_t  max_bytes = 4096,
size_t  max_messages = 1024 
)

Creates a new asynchronous MIDI wait message queue. The queue can store up to `max_messages` MIDI messages and up to `max_bytes` of MIDI data before it starts rejecting messages.

Definition at line 28 of file JackMidiAsyncWaitQueue.cpp.


Member Function Documentation

Dequeues and returns a MIDI event. Returns '0' if there are no MIDI events available right now.

Reimplemented from Jack::JackMidiAsyncQueue.

Definition at line 43 of file JackMidiAsyncWaitQueue.cpp.

Waits a specified time for a MIDI event to be available, or indefinitely if the time is negative. Returns the MIDI event, or '0' if time runs out and no MIDI event is available.

Definition at line 69 of file JackMidiAsyncWaitQueue.cpp.

Waits until the specified frame for a MIDI event to be available. Returns the MIDI event, or '0' if time runs out and no MIDI event is available.

Definition at line 49 of file JackMidiAsyncWaitQueue.cpp.

Jack::JackMidiWriteQueue::EnqueueResult JackMidiAsyncWaitQueue::EnqueueEvent ( jack_nframes_t  time,
size_t  size,
jack_midi_data_t *  buffer 
) [virtual]

Enqueues the MIDI event specified by the arguments. The return value indiciates whether or not the event was successfully enqueued.

Reimplemented from Jack::JackMidiAsyncQueue.

Definition at line 76 of file JackMidiAsyncWaitQueue.cpp.


The documentation for this class was generated from the following files: