OpenShot Library | libopenshot-audio
0.2.0
|
Used to iterate through the events in a MidiBuffer. More...
#include <juce_MidiBuffer.h>
Public Member Functions | |
Iterator (const MidiBuffer &) noexcept | |
Creates an Iterator for this MidiBuffer. More... | |
Iterator (const Iterator &)=default | |
Creates a copy of an iterator. More... | |
Iterator & | operator= (const Iterator &)=delete |
~Iterator () noexcept | |
Destructor. More... | |
void | setNextSamplePosition (int samplePosition) noexcept |
Repositions the iterator so that the next event retrieved will be the first one whose sample position is at greater than or equal to the given position. | |
bool | getNextEvent (MidiMessage &result, int &samplePosition) noexcept |
Retrieves a copy of the next event from the buffer. More... | |
bool | getNextEvent (const uint8 *&midiData, int &numBytesOfMidiData, int &samplePosition) noexcept |
Retrieves the next event from the buffer. More... | |
Used to iterate through the events in a MidiBuffer.
Note that altering the buffer while an iterator is using it will produce undefined behaviour.
Definition at line 174 of file juce_MidiBuffer.h.
|
noexcept |
Creates an Iterator for this MidiBuffer.
Definition at line 194 of file juce_MidiBuffer.cpp.
|
default |
Creates a copy of an iterator.
|
noexcept |
Destructor.
Definition at line 199 of file juce_MidiBuffer.cpp.
|
noexcept |
Retrieves a copy of the next event from the buffer.
result | on return, this will be the message. The MidiMessage's timestamp is set to the same value as samplePosition. |
samplePosition | on return, this will be the position of the event, as a sample index in the buffer |
Definition at line 224 of file juce_MidiBuffer.cpp.
Referenced by juce::MidiBuffer::addEvents(), juce::MidiRPNGenerator::generate(), juce::MPEZoneLayout::processNextMidiBuffer(), juce::MidiKeyboardState::processNextMidiBuffer(), juce::MPEInstrument::releaseAllNotes(), juce::MidiMessageCollector::removeNextBlockOfMessages(), juce::MPESynthesiserBase::renderNextBlock(), juce::MidiOutput::sendBlockOfMessages(), juce::MidiOutput::sendBlockOfMessagesNow(), juce::Synthesiser::setCurrentPlaybackSampleRate(), and juce::MPEMessages::setZoneLayout().
|
noexcept |
Retrieves the next event from the buffer.
midiData | on return, this pointer will be set to a block of data containing the midi message. Note that to make it fast, this is a pointer directly into the MidiBuffer's internal data, so is only valid temporarily until the MidiBuffer is altered. |
numBytesOfMidiData | on return, this is the number of bytes of data used by the midi message |
samplePosition | on return, this will be the position of the event, as a sample index in the buffer |
Definition at line 210 of file juce_MidiBuffer.cpp.