1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added new method MidiOutput::sendBlockOfMessagesNow()

This commit is contained in:
jules 2015-12-10 10:34:25 +00:00
parent 40a6372a58
commit 6faa33cfbd
2 changed files with 14 additions and 3 deletions

View file

@ -40,6 +40,16 @@ MidiOutput::MidiOutput(const String& midiName)
{
}
void MidiOutput::sendBlockOfMessagesNow (const MidiBuffer& buffer)
{
MidiBuffer::Iterator i (buffer);
MidiMessage message;
int samplePosition; // Note: not actually used, so no need to initialise.
while (i.getNextEvent (message, samplePosition))
sendMessageNow (message);
}
void MidiOutput::sendBlockOfMessages (const MidiBuffer& buffer,
const double millisecondCounterToStartAt,
double samplesPerSecondForBuffer)

View file

@ -87,11 +87,12 @@ public:
/** Returns the name of this device. */
const String& getName() const noexcept { return name; }
/** Makes this device output a midi message.
@see MidiMessage
*/
/** Sends out a MIDI message immediately. */
void sendMessageNow (const MidiMessage& message);
/** Sends out a sequence of MIDI messages immediately. */
void sendBlockOfMessagesNow (const MidiBuffer& buffer);
//==============================================================================
/** This lets you supply a block of messages that will be sent out at some point
in the future.