|
wavelength 1.0.0
|
Ring buffers of MIDI messages stamped with the system clock time they fall due. More...
#include <midieventqueue.h>
Public Types | |
| enum | Queue { kPrimaryQueue = 0 , kSecondaryQueue = 1 } |
| The queues Push() selects. More... | |
Static Public Member Functions | |
| static void | Push (MidiEvent event, unsigned int timeLow, unsigned int timeHigh, int queue) |
| Append a message. | |
| static bool | Pop (MidiEvent *event, unsigned int timeLow, unsigned int timeHigh) |
| Remove the oldest message of the primary queue when it is due. | |
Static Public Attributes | |
| static constexpr int | kCapacity = 500 |
Ring buffers of MIDI messages stamped with the system clock time they fall due.
The class has no RTTI, and its name is inferred from its role. Every member is static. There are two queues, but only the first is ever filled or drained. A push that would fill a queue empties it first.
|
static |
Append a message.
| event | The message. |
| timeLow | Low word of the due time. |
| timeHigh | High word of the due time. |
| queue | kPrimaryQueue, or any other value for the secondary queue. |
|
static |
Remove the oldest message of the primary queue when it is due.
A message counts as due when its high word is below the current one, or when the current low word has reached its low word whatever the high words.
| event | Receives the message. |
| timeLow | Low word of the current time. |
| timeHigh | High word of the current time. |
|
staticconstexpr |
Slots of each queue.