#include <MIDI_Interfaces/MIDI_Pipes.hpp>
Receives MIDI messages from a MIDI pipe.
Definition at line 75 of file MIDI_Pipes.hpp.
Sending data over a MIDI Pipe | |
virtual void | sinkMIDIfromPipe (ChannelMessage)=0 |
Accept an incoming MIDI Channel message. | |
virtual void | sinkMIDIfromPipe (SysExMessage)=0 |
Accept an incoming MIDI System Exclusive message. | |
virtual void | sinkMIDIfromPipe (SysCommonMessage)=0 |
Accept an incoming MIDI System Common message. | |
virtual void | sinkMIDIfromPipe (RealTimeMessage)=0 |
Accept an incoming MIDI Real-Time message. | |
Connecting and disconnecting MIDI Pipes | |
void | connectSourcePipe (MIDI_Pipe *source) |
Fully connect a source pipe to this sink. | |
void | disconnectSourcePipes () |
Disconnect all source pipes that sink to this sink (recursively). | |
bool | disconnect (TrueMIDI_Source &source) |
Disconnect the given source from this sink. | |
bool | disconnect (MIDI_Pipe &)=delete |
bool | hasSourcePipe () const |
Check if this sink is connected to a source pipe. | |
MIDI_Pipe * | getSourcePipe () const |
Get a pointer to the pipe this sink is connected to, or nullptr if not connected. | |
Public Member Functions | |
MIDI_Sink ()=default | |
Default constructor. | |
MIDI_Sink (const MIDI_Sink &)=delete | |
Copy constructor (copying not allowed). | |
MIDI_Sink & | operator= (const MIDI_Sink &)=delete |
Copy assignment (copying not allowed). | |
MIDI_Sink (MIDI_Sink &&other) | |
Move constructor. | |
MIDI_Sink & | operator= (MIDI_Sink &&other) |
Move assignment. | |
virtual | ~MIDI_Sink () |
Destructor. | |
Static Public Member Functions | |
static void | swap (MIDI_Sink &a, MIDI_Sink &b) |
Protected Attributes | |
MIDI_Pipe * | sourcePipe = nullptr |
Private Member Functions | |
virtual void | stallDownstream (MIDIStaller *, MIDI_Source *) |
Base case for recursive stall function. | |
virtual void | unstallDownstream (MIDIStaller *, MIDI_Source *) |
Base case for recursive un-stall function. | |
virtual MIDI_Sink * | getFinalSink () |
Base case for recursive function. | |
void | disconnectSourcePipesShallow () |
Disconnect only the first pipe connected to this sink. | |
|
default |
Default constructor.
Move constructor.
Definition at line 49 of file MIDI_Pipes.cpp.
|
virtual |
Destructor.
Definition at line 47 of file MIDI_Pipes.cpp.
Move assignment.
Definition at line 69 of file MIDI_Pipes.cpp.
|
pure virtual |
Accept an incoming MIDI Channel message.
Implemented in StreamDebugMIDI_Output, Control_Surface_, MIDI_Interface, and MIDI_Pipe.
|
pure virtual |
Accept an incoming MIDI System Exclusive message.
Implemented in StreamDebugMIDI_Output, Control_Surface_, MIDI_Interface, and MIDI_Pipe.
|
pure virtual |
Accept an incoming MIDI System Common message.
Implemented in StreamDebugMIDI_Output, Control_Surface_, MIDI_Interface, and MIDI_Pipe.
|
pure virtual |
Accept an incoming MIDI Real-Time message.
Implemented in StreamDebugMIDI_Output, Control_Surface_, MIDI_Interface, and MIDI_Pipe.
void connectSourcePipe | ( | MIDI_Pipe * | source | ) |
Fully connect a source pipe to this sink.
Definition at line 17 of file MIDI_Pipes.cpp.
void disconnectSourcePipes | ( | ) |
Disconnect all source pipes that sink to this sink (recursively).
Definition at line 26 of file MIDI_Pipes.cpp.
bool disconnect | ( | TrueMIDI_Source & | source | ) |
Disconnect the given source from this sink.
Leaves other sources connected. Returns true if the source was found and disconnected, false if the given source was not a direct or indirect source to this sink.
Definition at line 41 of file MIDI_Pipes.cpp.
|
delete |
|
inline |
Check if this sink is connected to a source pipe.
Definition at line 121 of file MIDI_Pipes.hpp.
|
inline |
Get a pointer to the pipe this sink is connected to, or nullptr
if not connected.
Definition at line 124 of file MIDI_Pipes.hpp.
|
inlineprivatevirtual |
Base case for recursive stall function.
Reimplemented in MIDI_Pipe.
Definition at line 131 of file MIDI_Pipes.hpp.
|
inlineprivatevirtual |
Base case for recursive un-stall function.
Reimplemented in MIDI_Pipe.
Definition at line 134 of file MIDI_Pipes.hpp.
|
inlineprivatevirtual |
Base case for recursive function.
Reimplemented in MIDI_Pipe.
Definition at line 137 of file MIDI_Pipes.hpp.
|
private |
Disconnect only the first pipe connected to this sink.
Leaves the other pipes connected to the original pipe, which doesn't have a sink anymore when this function finishes. Used to disconnect a MIDI_Pipe while preserving the connections of its “through” inputs.
Definition at line 34 of file MIDI_Pipes.cpp.
Definition at line 57 of file MIDI_Pipes.cpp.
|
protected |
Definition at line 146 of file MIDI_Pipes.hpp.