Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Ase::MidiEventOutput Class Reference

A stream of writable MidiEvent structures. More...

#include "midievent.hh"

Public Member Functions

void append (int16_t frame, const MidiEvent &event)
 Append an MidiEvent with conscutive frame time stamp.
 
const MidiEventbegin () const noexcept
 
const MidiEventend () const noexcept
 
size_t size () const noexcept
 
bool empty () const noexcept
 
void clear () noexcept
 
bool append_unsorted (int16_t frame, const MidiEvent &event)
 
void ensure_order ()
 Fix event order after append_unsorted() returned true.
 
int64_t last_frame () const ASE_PURE
 Fetch the latest event stamp, can be used to enforce order.
 
size_t capacity () const noexcept
 
void reserve (size_t n)
 
std::vector< MidiEvent > const & vector ()
 

Detailed Description

A stream of writable MidiEvent structures.

Definition at line 96 of file midievent.hh.

Constructor & Destructor Documentation

◆ MidiEventOutput()

Ase::MidiEventOutput::MidiEventOutput ( )
explicit

Definition at line 178 of file midievent.cc.

Member Function Documentation

◆ append()

void Ase::MidiEventOutput::append ( int16_t  frame,
const MidiEvent event 
)

Append an MidiEvent with conscutive frame time stamp.

Definition at line 183 of file midievent.cc.

References assert_return.

Referenced by Ase::MidiLib::MidiProducerImpl::render().

◆ append_unsorted()

bool Ase::MidiEventOutput::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.

Definition at line 192 of file midievent.cc.

References int64_t.

Referenced by Ase::MidiLib::MidiProducerImpl::render().

◆ begin()

const MidiEvent * Ase::MidiEventOutput::begin ( ) const
noexcept

Definition at line 101 of file midievent.hh.

◆ capacity()

size_t Ase::MidiEventOutput::capacity ( ) const
noexcept

Definition at line 109 of file midievent.hh.

◆ clear()

void Ase::MidiEventOutput::clear ( )
noexcept

Definition at line 105 of file midievent.hh.

◆ empty()

bool Ase::MidiEventOutput::empty ( ) const
noexcept

Definition at line 104 of file midievent.hh.

◆ end()

const MidiEvent * Ase::MidiEventOutput::end ( ) const
noexcept

Definition at line 102 of file midievent.hh.

◆ ensure_order()

void Ase::MidiEventOutput::ensure_order ( )

Fix event order after append_unsorted() returned true.

Definition at line 205 of file midievent.cc.

References Ase::fixed_sort().

Referenced by Ase::MidiLib::MidiProducerImpl::render().

◆ last_frame()

int64_t Ase::MidiEventOutput::last_frame ( ) const

Fetch the latest event stamp, can be used to enforce order.

Definition at line 214 of file midievent.cc.

◆ reserve()

void Ase::MidiEventOutput::reserve ( size_t  n)

Definition at line 110 of file midievent.hh.

◆ size()

size_t Ase::MidiEventOutput::size ( ) const
noexcept

Definition at line 103 of file midievent.hh.

◆ vector()

std::vector< MidiEvent > const & Ase::MidiEventOutput::vector ( )

Definition at line 112 of file midievent.hh.


The documentation for this class was generated from the following files: