diff framework/MainWindowBase.h @ 658:94f518af106c single-point

Support reading OSC script from stdin; make it possible to run OSC script even without external OSC port
author Chris Cannam
date Thu, 28 Mar 2019 13:37:40 +0000
parents 4f53620962d9
children 49cf3787cf22
line wrap: on
line diff
--- a/framework/MainWindowBase.h	Thu Mar 28 11:55:54 2019 +0000
+++ b/framework/MainWindowBase.h	Thu Mar 28 13:37:40 2019 +0000
@@ -362,13 +362,18 @@
     class OSCQueueStarter : public QThread
     {
     public:
-        OSCQueueStarter(MainWindowBase *mwb) : QThread(mwb), m_mwb(mwb) { }
+        OSCQueueStarter(MainWindowBase *mwb, bool withNetworkPort) :
+            QThread(mwb), m_mwb(mwb), m_withPort(withNetworkPort) { }
+
         void run() override {
-            OSCQueue *queue = new OSCQueue(); // can take a long time
+            // NB creating the queue object can take a long time
+            OSCQueue *queue = new OSCQueue(m_withPort);
             m_mwb->m_oscQueue = queue;
         }
+        
     private:
         MainWindowBase *m_mwb;
+        bool m_withPort;
     };
 
     OSCQueue                *m_oscQueue;
@@ -376,7 +381,7 @@
     OSCScript               *m_oscScript;
     QString                  m_oscScriptFile;
 
-    void startOSCQueue();
+    void startOSCQueue(bool withNetworkPort);
     void startOSCScript();
 
     MIDIInput               *m_midiInput;