Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
/home/iurt/rpm/BUILD/canorus-0.7.R1002/src/interface/rtmididevice.h
Go to the documentation of this file.
00001 
00008 #ifndef RTMIDIDEVICE_H_
00009 #define RTMIDIDEVICE_H_
00010 
00011 #include "interface/mididevice.h"
00012 
00013 class RtMidiOut;
00014 class RtMidiIn;
00015 
00016 #ifndef SWIG
00017 void rtMidiInCallback( double deltatime, std::vector< unsigned char > *message, void *userData );
00018 #endif
00019 
00020 class CARtMidiDevice : public CAMidiDevice {
00021 public:
00022         CARtMidiDevice();
00023         ~CARtMidiDevice();
00024         
00025         QMap<int, QString> getOutputPorts();
00026         QMap<int, QString> getInputPorts();
00027         
00028         bool openOutputPort(int port);  // return true on success, false otherwise
00029         bool openInputPort(int port);   // return true on success, false otherwise      
00030         void closeOutputPort();
00031         void closeInputPort();
00032         void send(QVector<unsigned char> message, int offset=0);
00033         
00034 private:
00035         RtMidiOut *_out;
00036         RtMidiIn *_in;
00037         bool _outOpen;
00038         bool _inOpen;
00039 };
00040 
00041 #endif /* RTMIDIDEVICE_H_ */