ASPiK SDK
Loading...
Searching...
No Matches
AUMIDIEventQueue Class Reference

The AUMIDIEventQueue interface queues incoming MIDI messages and blasts them out during the buffer processing phase. More...

#include <aufxplugin.h>

Inheritance diagram for AUMIDIEventQueue:
IMidiEventQueue

Public Member Functions

 AUMIDIEventQueue (PluginCore *_pluginCore)
 
virtual ~AUMIDIEventQueue ()
 
void clearEvents ()
 
void clearQueueAEvents ()
 
void clearQueueBEvents ()
 
void toggleQueue ()
 
void addEvent (midiEvent event)
 
virtual unsigned int getEventCount ()
 
virtual bool fireMidiEvents (unsigned int sampleOffset)
 
 AUMIDIEventQueue (PluginCore *_pluginCore)
 
virtual ~AUMIDIEventQueue ()
 
void clearEvents ()
 
void clearQueueAEvents ()
 
void clearQueueBEvents ()
 
void toggleQueue ()
 
void addEvent (midiEvent event)
 
virtual unsigned int getEventCount ()
 
virtual bool fireMidiEvents (unsigned int sampleOffset)
 
- Public Member Functions inherited from IMidiEventQueue
virtual uint32_t getEventCount ()=0
 
virtual bool fireMidiEvents (uint32_t uSampleOffset)=0
 

Protected Attributes

PluginCorepluginCore = nullptr
 the core object to send MIDI messages to
 
std::queue< midiEventmidiEventQueueA
 queue A
 
std::queue< midiEventmidiEventQueueB
 queue B
 
std::atomic< bool > writingQueueA
 atomic flag for toggling buffers
 

Detailed Description

The AUMIDIEventQueue interface queues incoming MIDI messages and blasts them out during the buffer processing phase.

NOTES:

  • the current version uses a pair of queues and an atomic boolean flag to implement a double-buffer scheme
  • this will be updated later to use a lock-free ring buffer but the operation will remain transparemt
Author
Will Pirkle http://www.willpirkle.com
Remarks
This object is included in Designing Audio Effects Plugins in C++ 2nd Ed. by Will Pirkle
Version
Revision : 1.0
Date
Date : 2018 / 09 / 7

NOTES:

  • the current version uses a pair of queues and an atomic boolean flag to implement a double-buffer scheme
  • this will be updated later to use a lock-free ring buffer but the operation will remain transparemt
Author
Will Pirkle http://www.willpirkle.com
Remarks
This object is included in Designing Audio Effects Plugins in C++ 2nd Ed. by Will Pirkle
Version
Revision : 1.0
Date
Date : 2018 / 09 / 7

Constructor & Destructor Documentation

◆ AUMIDIEventQueue() [1/2]

AUMIDIEventQueue::AUMIDIEventQueue ( PluginCore _pluginCore)
inline

consruct with a core pointer

◆ ~AUMIDIEventQueue() [1/2]

virtual AUMIDIEventQueue::~AUMIDIEventQueue ( )
inlinevirtual

just clear out the events that may remain

◆ AUMIDIEventQueue() [2/2]

AUMIDIEventQueue::AUMIDIEventQueue ( PluginCore _pluginCore)
inline

consruct with a core pointer

◆ ~AUMIDIEventQueue() [2/2]

virtual AUMIDIEventQueue::~AUMIDIEventQueue ( )
inlinevirtual

just clear out the events that may remain

Member Function Documentation

◆ addEvent() [1/2]

void AUMIDIEventQueue::addEvent ( midiEvent  event)
inline

add a MIDI event to the currently active writing queue

◆ addEvent() [2/2]

void AUMIDIEventQueue::addEvent ( midiEvent  event)
inline

add a MIDI event to the currently active writing queue

◆ clearEvents() [1/2]

void AUMIDIEventQueue::clearEvents ( )
inline

clear both A and B queues

◆ clearEvents() [2/2]

void AUMIDIEventQueue::clearEvents ( )
inline

clear both A and B queues

◆ clearQueueAEvents() [1/2]

void AUMIDIEventQueue::clearQueueAEvents ( )
inline

clear queue A

◆ clearQueueAEvents() [2/2]

void AUMIDIEventQueue::clearQueueAEvents ( )
inline

clear queue A

◆ clearQueueBEvents() [1/2]

void AUMIDIEventQueue::clearQueueBEvents ( )
inline

clear queue B

◆ clearQueueBEvents() [2/2]

void AUMIDIEventQueue::clearQueueBEvents ( )
inline

clear queue B

◆ fireMidiEvents() [1/2]

virtual bool AUMIDIEventQueue::fireMidiEvents ( unsigned int  sampleOffset)
inlinevirtual

send MIDI event with this sample offset to the core for processing

◆ fireMidiEvents() [2/2]

virtual bool AUMIDIEventQueue::fireMidiEvents ( unsigned int  sampleOffset)
inlinevirtual

send MIDI event with this sample offset to the core for processing

◆ getEventCount() [1/2]

virtual unsigned int AUMIDIEventQueue::getEventCount ( )
inlinevirtual

get a MIDI event from the currently active reading queue

Implements IMidiEventQueue.

◆ getEventCount() [2/2]

virtual unsigned int AUMIDIEventQueue::getEventCount ( )
inlinevirtual

get a MIDI event from the currently active reading queue

Implements IMidiEventQueue.

◆ toggleQueue() [1/2]

void AUMIDIEventQueue::toggleQueue ( )
inline

atomic flag toggle

◆ toggleQueue() [2/2]

void AUMIDIEventQueue::toggleQueue ( )
inline

atomic flag toggle


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