mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
MIDI: Update UMPDispatcher to allow dispatching on a specific group
This commit is contained in:
parent
fa1f8ed54e
commit
7dc906fa1b
2 changed files with 18 additions and 8 deletions
|
|
@ -107,7 +107,7 @@ struct BytestreamToBytestreamHandler : public BytestreamInputHandler
|
|||
struct BytestreamToUMPHandler : public BytestreamInputHandler
|
||||
{
|
||||
BytestreamToUMPHandler (PacketProtocol protocol, Receiver& c)
|
||||
: recipient (c), dispatcher (protocol, 2048) {}
|
||||
: recipient (c), dispatcher (0, protocol, 2048) {}
|
||||
|
||||
/**
|
||||
Provides an `operator()` which can create an input handler for a given
|
||||
|
|
@ -137,9 +137,9 @@ struct BytestreamToUMPHandler : public BytestreamInputHandler
|
|||
void pushMidiData (const void* data, int bytes, double time) override
|
||||
{
|
||||
const auto* ptr = static_cast<const std::byte*> (data);
|
||||
dispatcher.dispatch (Span { ptr, (size_t) bytes }, time, [&] (const View& v)
|
||||
dispatcher.dispatch (Span { ptr, (size_t) bytes }, time, [&] (const View& v, double t)
|
||||
{
|
||||
recipient.packetReceived (v, time);
|
||||
recipient.packetReceived (v, t);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue