Browse Source

„MidiListener.cpp“ löschen

master
Lars Mewes 2 years ago
parent
commit
69be29f55f
1 changed files with 0 additions and 35 deletions
  1. 0
    35
      MidiListener.cpp

+ 0
- 35
MidiListener.cpp View File

@@ -1,35 +0,0 @@
#include "MidiListener.h"
#include <vector>
#include <QString>
void MidiListener::start(int Port){
midiin = new RtMidiIn(RtMidi::Api::LINUX_ALSA, "Scrjabin");

try {
midiin->openPort(Port);
}
catch ( RtMidiError &error ) {
error.printMessage();
}
emit newMidiMessage(0,0,0);

};
void MidiListener::listen(){
std::vector<unsigned char> message;

// Don't ignore sysex, timing, or active sensing messages.
midiin->ignoreTypes( false, false, false );

midiin->getMessage( &message );
if ( message.size() == 3 )
emit newMidiMessage(message[0], message[1], message[2]);
else
emit newMidiMessage(0,0,0);
};
void MidiListener::stop(){
delete midiin;
this->disconnect();
this->~MidiListener();
}
MidiListener::~MidiListener(){

}

Loading…
Cancel
Save