diff --git a/src/audio/rtmidi.h b/src/audio/rtmidi.h index 5fbba78fe..0803c3fcd 100644 --- a/src/audio/rtmidi.h +++ b/src/audio/rtmidi.h @@ -17,4 +17,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "../../extern/rtmidi/RtMidi.h" \ No newline at end of file +#include "../../extern/rtmidi/RtMidi.h" +#include "taAudio.h" + +class TAMidiInRtMidi: public TAMidiIn { + +}; + +class TAMidiOutRtMidi: public TAMidiOut { + +}; \ No newline at end of file diff --git a/src/audio/taAudio.h b/src/audio/taAudio.h index 10712bc03..1f8c32305 100644 --- a/src/audio/taAudio.h +++ b/src/audio/taAudio.h @@ -20,6 +20,7 @@ #ifndef _TAAUDIO_H #define _TAAUDIO_H #include "../ta-utils.h" +#include #include struct SampleRateChangeEvent { @@ -116,14 +117,24 @@ struct TAMidiMessage { void submitSysEx(std::vector data); void done(); + + TAMidiMessage(): + type(0), + sysExData(NULL), + sysExLen(0) { + memset(&data,0,sizeof(data)); + } }; class TAMidiIn { + std::queue queue; public: + virtual bool gather(); bool next(TAMidiMessage& where); }; class TAMidiOut { + std::queue queue; public: bool send(TAMidiMessage& what); }; @@ -140,8 +151,8 @@ class TAAudio { void (*sampleRateChanged)(SampleRateChangeEvent); void (*bufferSizeChanged)(BufferSizeChangeEvent); public: - std::vector midiIn; - std::vector midiOut; + TAMidiIn* midiIn; + TAMidiOut* midiOut; void setSampleRateChangeCallback(void (*callback)(SampleRateChangeEvent)); void setBufferSizeChangeCallback(void (*callback)(BufferSizeChangeEvent));