svcore  1.9
MIDIInput Class Reference

#include <MIDIInput.h>

Inheritance diagram for MIDIInput:
Collaboration diagram for MIDIInput:

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::MIDIInput ( QString  name,
FrameTimer timer 
)

Definition at line 22 of file MIDIInput.cpp.

References m_rtmidi, and staticCallback().

◆ ~MIDIInput()

MIDIInput::~MIDIInput ( )
virtual

Definition at line 38 of file MIDIInput.cpp.

References m_rtmidi.

Member Function Documentation

◆ isOK()

bool MIDIInput::isOK ( ) const
inline

Definition at line 36 of file MIDIInput.h.

References m_rtmidi.

◆ isEmpty()

bool MIDIInput::isEmpty ( ) const
inline

Definition at line 38 of file MIDIInput.h.

References getEventsAvailable().

◆ getEventsAvailable()

int MIDIInput::getEventsAvailable ( ) const
inline

Definition at line 39 of file MIDIInput.h.

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

Referenced by isEmpty().

◆ readEvent()

MIDIEvent MIDIInput::readEvent ( )

Definition at line 69 of file MIDIInput.cpp.

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

◆ eventsAvailable

void MIDIInput::eventsAvailable ( )
signal

Referenced by postEvent().

◆ staticCallback()

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

Definition at line 44 of file MIDIInput.cpp.

Referenced by MIDIInput().

◆ callback()

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

Definition at line 51 of file MIDIInput.cpp.

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

◆ postEvent()

void MIDIInput::postEvent ( MIDIEvent  e)
protected

Member Data Documentation

◆ m_rtmidi

RtMidiIn* MIDIInput::m_rtmidi
protected

Definition at line 46 of file MIDIInput.h.

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

◆ m_frameTimer

FrameTimer* MIDIInput::m_frameTimer
protected

Definition at line 47 of file MIDIInput.h.

Referenced by callback().

◆ m_buffer

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: