#include <MIDIInput.h>

Inheritance diagram for MIDIInput:
Inheritance graph
Collaboration diagram for MIDIInput:
Collaboration graph

Signals

void eventsAvailable ()
 

Public Member Functions

 MIDIInput (QString name, FrameTimer *timer)
 
virtual ~MIDIInput ()
 
bool isOK () const
 
bool isEmpty () const
 
int getEventsAvailable () const
 
MIDIEvent readEvent ()
 

Protected Member Functions

void callback (double, std::vector< unsigned char > *)
 
void postEvent (MIDIEvent)
 

Static Protected Member Functions

static void staticCallback (double, std::vector< unsigned char > *, void *)
 

Protected Attributes

RtMidiIn * m_rtmidi
 
FrameTimerm_frameTimer
 
RingBuffer< MIDIEvent * > m_buffer
 

Detailed Description

Definition at line 28 of file MIDIInput.h.

Constructor & Destructor Documentation

MIDIInput::MIDIInput ( QString  name,
FrameTimer timer 
)

Definition at line 22 of file MIDIInput.cpp.

References m_rtmidi, staticCallback(), SVCERR, and SVDEBUG.

MIDIInput::~MIDIInput ( )
virtual

Definition at line 74 of file MIDIInput.cpp.

References m_rtmidi.

Member Function Documentation

bool MIDIInput::isOK ( ) const
inline

Definition at line 36 of file MIDIInput.h.

References m_rtmidi.

bool MIDIInput::isEmpty ( ) const
inline

Definition at line 38 of file MIDIInput.h.

References getEventsAvailable().

int MIDIInput::getEventsAvailable ( ) const
inline

Definition at line 39 of file MIDIInput.h.

References eventsAvailable(), RingBuffer< T, N >::getReadSpace(), m_buffer, and readEvent().

Referenced by isEmpty().

MIDIEvent MIDIInput::readEvent ( )

Definition at line 105 of file MIDIInput.cpp.

References m_buffer, and RingBuffer< T, N >::readOne().

Referenced by getEventsAvailable().

void MIDIInput::eventsAvailable ( )
signal

Referenced by getEventsAvailable(), and postEvent().

void MIDIInput::staticCallback ( double  timestamp,
std::vector< unsigned char > *  message,
void *  userData 
)
staticprotected

Definition at line 80 of file MIDIInput.cpp.

Referenced by MIDIInput().

void MIDIInput::callback ( double  timestamp,
std::vector< unsigned char > *  message 
)
protected

Definition at line 87 of file MIDIInput.cpp.

References FrameTimer::getFrame(), m_frameTimer, postEvent(), and SVDEBUG.

void MIDIInput::postEvent ( MIDIEvent  e)
protected

Member Data Documentation

RtMidiIn* MIDIInput::m_rtmidi
protected

Definition at line 46 of file MIDIInput.h.

Referenced by isOK(), MIDIInput(), and ~MIDIInput().

FrameTimer* MIDIInput::m_frameTimer
protected

Definition at line 47 of file MIDIInput.h.

Referenced by callback().

RingBuffer<MIDIEvent *> MIDIInput::m_buffer
protected

Definition at line 53 of file MIDIInput.h.

Referenced by getEventsAvailable(), postEvent(), and readEvent().


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