JUCE
|
Parses a raw stream of uint32_t, and calls a user-provided callback every time a full Universal MIDI Packet is encountered. More...
#include <juce_UMPDispatcher.h>
Public Member Functions | |
void | reset () |
Clears the dispatcher. | |
template<typename PacketCallbackFunction> | |
void | dispatch (const uint32_t *begin, const uint32_t *end, double timeStamp, PacketCallbackFunction &&callback) |
Calls callback with a View of each packet encountered in the range delimited by begin and end . | |
Parses a raw stream of uint32_t, and calls a user-provided callback every time a full Universal MIDI Packet is encountered.
void universal_midi_packets::Dispatcher::reset | ( | ) |
Clears the dispatcher.
void universal_midi_packets::Dispatcher::dispatch | ( | const uint32_t * | begin, |
const uint32_t * | end, | ||
double | timeStamp, | ||
PacketCallbackFunction && | callback ) |
Calls callback
with a View of each packet encountered in the range delimited by begin
and end
.
If the range ends part-way through a packet, the next call to dispatch
will continue from that point in the packet (unless reset
is called first).
References begin(), end(), and universal_midi_packets::Utils::getNumWordsForMessageType().