mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
MIDI: Add span getters for MidiMessage and MidiMessageMetadata
This commit is contained in:
parent
85191fa50a
commit
fb4f04e4d1
3 changed files with 16 additions and 4 deletions
|
|
@ -51,13 +51,11 @@ struct BytestreamMidiView
|
|||
to a temporary.
|
||||
*/
|
||||
explicit BytestreamMidiView (const MidiMessage* msg)
|
||||
: bytes (unalignedPointerCast<const std::byte*> (msg->getRawData()),
|
||||
static_cast<size_t> (msg->getRawDataSize())),
|
||||
: bytes (msg->asSpan()),
|
||||
timestamp (msg->getTimeStamp()) {}
|
||||
|
||||
explicit BytestreamMidiView (const MidiMessageMetadata msg)
|
||||
: bytes (unalignedPointerCast<const std::byte*> (msg.data),
|
||||
static_cast<size_t> (msg.numBytes)),
|
||||
: bytes (msg.asSpan()),
|
||||
timestamp (msg.samplePosition) {}
|
||||
|
||||
MidiMessage getMessage() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue