comparison framework/MainWindowBase.cpp @ 157:ae56bf90cdf9

* Wire up MIDI input port (as far as printing a message when an event comes in, anyway)
author Chris Cannam
date Mon, 23 Feb 2009 17:50:17 +0000
parents 89737ffa4580
children 64b09e5bda21
comparison
equal deleted inserted replaced
156:89737ffa4580 157:ae56bf90cdf9
64 #include "base/XmlExportable.h" 64 #include "base/XmlExportable.h"
65 #include "base/Profiler.h" 65 #include "base/Profiler.h"
66 #include "base/Preferences.h" 66 #include "base/Preferences.h"
67 67
68 #include "data/osc/OSCQueue.h" 68 #include "data/osc/OSCQueue.h"
69 #include "data/midi/MIDIInput.h"
69 70
70 #include <QApplication> 71 #include <QApplication>
71 #include <QMessageBox> 72 #include <QMessageBox>
72 #include <QGridLayout> 73 #include <QGridLayout>
73 #include <QLabel> 74 #include <QLabel>
110 m_audioOutput(withAudioOutput), 111 m_audioOutput(withAudioOutput),
111 m_playSource(0), 112 m_playSource(0),
112 m_playTarget(0), 113 m_playTarget(0),
113 m_oscQueue(0), 114 m_oscQueue(0),
114 m_oscQueueStarter(0), 115 m_oscQueueStarter(0),
116 m_midiInput(0),
115 m_recentFiles("RecentFiles", 20), 117 m_recentFiles("RecentFiles", 20),
116 m_recentTransforms("RecentTransforms", 20), 118 m_recentTransforms("RecentTransforms", 20),
117 m_documentModified(false), 119 m_documentModified(false),
118 m_openingAudioFile(false), 120 m_openingAudioFile(false),
119 m_abandoning(false), 121 m_abandoning(false),
210 settings.endGroup(); 212 settings.endGroup();
211 213
212 m_labeller = new Labeller(labellerType); 214 m_labeller = new Labeller(labellerType);
213 m_labeller->setCounterCycleSize(cycle); 215 m_labeller->setCounterCycleSize(cycle);
214 216
217 m_midiInput = new MIDIInput(QApplication::applicationName());
218
215 if (withOSCSupport) { 219 if (withOSCSupport) {
216 m_oscQueueStarter = new OSCQueueStarter(this); 220 m_oscQueueStarter = new OSCQueueStarter(this);
217 connect(m_oscQueueStarter, SIGNAL(finished()), this, SLOT(oscReady())); 221 connect(m_oscQueueStarter, SIGNAL(finished()), this, SLOT(oscReady()));
218 m_oscQueueStarter->start(); 222 m_oscQueueStarter->start();
219 } 223 }
224 if (m_playTarget) m_playTarget->shutdown(); 228 if (m_playTarget) m_playTarget->shutdown();
225 // delete m_playTarget; 229 // delete m_playTarget;
226 delete m_playSource; 230 delete m_playSource;
227 delete m_viewManager; 231 delete m_viewManager;
228 delete m_oscQueue; 232 delete m_oscQueue;
233 delete m_midiInput;
229 Profiles::getInstance()->dump(); 234 Profiles::getInstance()->dump();
230 } 235 }
231 236
232 void 237 void
233 MainWindowBase::oscReady() 238 MainWindowBase::oscReady()