Public Member Functions | List of all members
universal_midi_packets::Dispatcher Class Reference

Parses a raw stream of uint32_t, and calls a user-provided callback every time a full Universal MIDI Packet is encountered. More...

Public Member Functions

void reset ()
 Clears the dispatcher. More...
 
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. More...
 

Detailed Description

Parses a raw stream of uint32_t, and calls a user-provided callback every time a full Universal MIDI Packet is encountered.

Member Function Documentation

◆ reset()

void universal_midi_packets::Dispatcher::reset ( )

◆ dispatch()

template<typename PacketCallbackFunction >
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().

Referenced by universal_midi_packets::ToBytestreamDispatcher::dispatch().


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