#include "midievent.hh"
Public Member Functions | |
void | append (int16_t frame, const MidiEvent &event) |
bool | append_unsorted (int16_t frame, const MidiEvent &event) |
const MidiEvent * | begin () const noexcept |
size_t | capacity () const noexcept |
void | clear () noexcept |
bool | empty () const noexcept |
const MidiEvent * | end () const noexcept |
void | ensure_order () |
int64_t | last_frame () const ASE_PURE |
MidiEventOutput () | |
void | reserve (size_t n) |
size_t | size () const noexcept |
std::vector< MidiEvent > const & | vector () |
A stream of writable MidiEvent structures.
|
explicit |
void append | ( | int16_t | frame, |
const MidiEvent & | event | ||
) |
Append an MidiEvent with conscutive `frame` time stamp.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
bool append_unsorted | ( | int16_t | frame, |
const MidiEvent & | event | ||
) |
Dangerous! Append a MidiEvent while ignoring sort order, violates constraints. Returns if ensure_order() must be called due to adding an out-of-order event.
void ensure_order | ( | ) |
Fix event order after append_unsorted() returned `true`.
int64_t last_frame | ( | ) | const |
Fetch the latest event stamp, can be used to enforce order.
|
noexcept |
void reserve | ( | size_t | n | ) |
std::vector< MidiEvent > const & vector | ( | ) |