Mercurial > hg > svcore
comparison data/midi/MIDIInput.cpp @ 1599:ce185d4dd408 bqaudiostream
Merge from default branch
author | Chris Cannam |
---|---|
date | Wed, 23 Jan 2019 14:43:43 +0000 |
parents | 70e172e6cc59 |
children | 157c62ff0056 |
comparison
equal
deleted
inserted
replaced
1598:d2555df635ec | 1599:ce185d4dd408 |
---|---|
18 #include "rtmidi/RtMidi.h" | 18 #include "rtmidi/RtMidi.h" |
19 | 19 |
20 #include "system/System.h" | 20 #include "system/System.h" |
21 | 21 |
22 MIDIInput::MIDIInput(QString name, FrameTimer *timer) : | 22 MIDIInput::MIDIInput(QString name, FrameTimer *timer) : |
23 m_rtmidi(0), | 23 m_rtmidi(nullptr), |
24 m_frameTimer(timer), | 24 m_frameTimer(timer), |
25 m_buffer(1023) | 25 m_buffer(1023) |
26 { | 26 { |
27 try { | 27 try { |
28 std::vector<RtMidi::Api> apis; | 28 std::vector<RtMidi::Api> apis; |
45 | 45 |
46 if (n == 0) { | 46 if (n == 0) { |
47 | 47 |
48 SVDEBUG << "NOTE: MIDIInput: No input ports available" << endl; | 48 SVDEBUG << "NOTE: MIDIInput: No input ports available" << endl; |
49 delete m_rtmidi; | 49 delete m_rtmidi; |
50 m_rtmidi = 0; | 50 m_rtmidi = nullptr; |
51 | 51 |
52 } else { | 52 } else { |
53 | 53 |
54 m_rtmidi->setCallback(staticCallback, this); | 54 m_rtmidi->setCallback(staticCallback, this); |
55 | 55 |
65 } | 65 } |
66 | 66 |
67 } catch (const RtMidiError &e) { | 67 } catch (const RtMidiError &e) { |
68 SVCERR << "ERROR: RtMidi error: " << e.getMessage() << endl; | 68 SVCERR << "ERROR: RtMidi error: " << e.getMessage() << endl; |
69 delete m_rtmidi; | 69 delete m_rtmidi; |
70 m_rtmidi = 0; | 70 m_rtmidi = nullptr; |
71 } | 71 } |
72 } | 72 } |
73 | 73 |
74 MIDIInput::~MIDIInput() | 74 MIDIInput::~MIDIInput() |
75 { | 75 { |