Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::midi::SmfTrack Class Reference

A cursor over one track chunk. More...

Detailed Description

A cursor over one track chunk.

peek() decodes the next event without consuming it; pop() consumes it. A malformed event ends the track and sets error(). The file's bytes must outlive the cursor.

Definition at line 64 of file smf_reader.hpp.

#include <smf_reader.hpp>

Public Member Functions

 SmfTrack ()=default
 
 SmfTrack (const uint8_t *data, uint32_t length)
 
void rewind ()
 
const SmfEvent * peek ()
 The next event, or nullptr when the track has ended.
 
void pop ()
 
bool done () const
 
bool error () const
 

Constructor & Destructor Documentation

◆ SmfTrack() [1/2]

sbl::midi::SmfTrack::SmfTrack ( )
default

◆ SmfTrack() [2/2]

sbl::midi::SmfTrack::SmfTrack ( const uint8_t *  data,
uint32_t  length 
)
inline

Definition at line 67 of file smf_reader.hpp.

References rewind().

Member Function Documentation

◆ rewind()

void sbl::midi::SmfTrack::rewind ( )
inline

Definition at line 69 of file smf_reader.hpp.

Referenced by SmfTrack().

◆ peek()

const SmfEvent * sbl::midi::SmfTrack::peek ( )
inline

The next event, or nullptr when the track has ended.

Definition at line 79 of file smf_reader.hpp.

Referenced by sbl::midi::Sequencer< Outputs >::advance().

◆ pop()

void sbl::midi::SmfTrack::pop ( )
inline

Definition at line 84 of file smf_reader.hpp.

Referenced by sbl::midi::Sequencer< Outputs >::advance().

◆ done()

bool sbl::midi::SmfTrack::done ( ) const
inline

Definition at line 86 of file smf_reader.hpp.

◆ error()

bool sbl::midi::SmfTrack::error ( ) const
inline

Definition at line 87 of file smf_reader.hpp.


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