wavelength 1.0.0
Loading...
Searching...
No Matches
midieventqueue.h
Go to the documentation of this file.
1#pragma once
2
3#include "synth_s/midievent.h"
4
13public:
14 static constexpr int kCapacity = 500;
15
21
32 static void Push(MidiEvent event, unsigned int timeLow, unsigned int timeHigh, int queue);
33
47 static bool Pop(MidiEvent *event, unsigned int timeLow, unsigned int timeHigh);
48
49private:
50 static unsigned int sRead;
51 static unsigned int sWrite;
52 static unsigned int sSecondaryRead;
53 static unsigned int sSecondaryWrite;
54 static MidiEvent sEvents[kCapacity];
55 static unsigned int sTimeLow[kCapacity];
56 static unsigned int sTimeHigh[kCapacity];
57 static MidiEvent sSecondaryEvents[kCapacity];
58 static unsigned int sSecondaryTimeLow[kCapacity];
59 static unsigned int sSecondaryTimeHigh[kCapacity];
60};
Ring buffers of MIDI messages stamped with the system clock time they fall due.
Definition midieventqueue.h:12
static bool Pop(MidiEvent *event, unsigned int timeLow, unsigned int timeHigh)
Remove the oldest message of the primary queue when it is due.
static void Push(MidiEvent event, unsigned int timeLow, unsigned int timeHigh, int queue)
Append a message.
Queue
The queues Push() selects.
Definition midieventqueue.h:17
@ kSecondaryQueue
Definition midieventqueue.h:19
@ kPrimaryQueue
Definition midieventqueue.h:18
static constexpr int kCapacity
Definition midieventqueue.h:14
One MIDI channel message as the EE sends it in a timed batch.
Definition midievent.h:9