ScummVM API documentation
MT32Emu::MidiEventQueue Class Reference

#include <MidiEventQueue.h>

Classes

struct  MidiEvent
 

Public Member Functions

 MidiEventQueue (Bit32u ringBufferSize, Bit32u storageBufferSize)
 
void reset ()
 
bool pushShortMessage (Bit32u shortMessageData, Bit32u timestamp)
 
bool pushSysex (const Bit8u *sysexData, Bit32u sysexLength, Bit32u timestamp)
 
const volatile MidiEventpeekMidiEvent ()
 
void dropMidiEvent ()
 
bool isEmpty () const
 

Detailed Description

Simple queue implementation using a ring buffer to store incoming MIDI event before the synth actually processes it. It is intended to:

  • get rid of prerenderer while retaining graceful partial abortion
  • add fair emulation of the MIDI interface delays
  • extend the synth interface with the default implementation of a typical rendering loop. THREAD SAFETY: It is safe to use either in a single thread environment or when there are only two threads - one performs only reading and one performs only writing. More complicated usage requires external synchronisation.

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