JUCE
|
Parses a stream of 32-bit words representing a sequence of UMP-encoded MIDI messages, converting the messages to MIDI 1.0 bytestream format and passing them to a user-provided callback as they become ready. More...
#include <juce_UMPDispatcher.h>
Public Member Functions | |
ToBytestreamDispatcher (int storageSize) | |
Initialises the dispatcher. | |
void | reset () |
Clears the dispatcher. | |
template<typename BytestreamMessageCallback > | |
void | dispatch (const uint32_t *begin, const uint32_t *end, double timestamp, BytestreamMessageCallback &&callback) |
Calls callback with converted bytestream-formatted MidiMessage whenever a new message becomes available. | |
Parses a stream of 32-bit words representing a sequence of UMP-encoded MIDI messages, converting the messages to MIDI 1.0 bytestream format and passing them to a user-provided callback as they become ready.
|
explicit |
Initialises the dispatcher.
storageSize
bytes will be allocated to store incomplete messages.
void universal_midi_packets::ToBytestreamDispatcher::reset | ( | ) |
Clears the dispatcher.
References universal_midi_packets::Dispatcher::reset(), and universal_midi_packets::ToBytestreamConverter::reset().
void universal_midi_packets::ToBytestreamDispatcher::dispatch | ( | const uint32_t * | begin, |
const uint32_t * | end, | ||
double | timestamp, | ||
BytestreamMessageCallback && | callback ) |
Calls callback
with converted bytestream-formatted MidiMessage whenever a new message becomes available.
begin | the first word in a stream of words representing UMP-encoded MIDI packets. |
end | one-past the last word in a stream of words representing UMP-encoded MIDI packets. |
timestamp | a timestamp to apply to converted messages. |
callback | a callback which will be passed a MidiMessage each time a new message becomes ready. |
References begin(), universal_midi_packets::ToBytestreamConverter::convert(), universal_midi_packets::Dispatcher::dispatch(), and end().