initial pass at MIDI input for scripting
Showing the changes to interface/src/Application.cpp (1 of 10 files). Show all
Unified · Split
| @@ -70,6 +70,7 @@ · 69 unmodified lines | |||
| 70 | #include "Menu.h" | 70 | #include "Menu.h" |
| 71 | #include "ModelUploader.h" | 71 | #include "ModelUploader.h" |
| 72 | #include "Util.h" | 72 | #include "Util.h" |
| 73 | #include "devices/MIDIManager.h" | ||
| 73 | #include "devices/OculusManager.h" | 74 | #include "devices/OculusManager.h" |
| 74 | #include "devices/TV3DManager.h" | 75 | #include "devices/TV3DManager.h" |
| 75 | #include "renderer/ProgramObject.h" | 76 | #include "renderer/ProgramObject.h" |
| @@ -396,6 +397,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 320 unmodified lines | |||
| 396 | OAuthWebViewHandler::addHighFidelityRootCAToSSLConfig(); | 397 | OAuthWebViewHandler::addHighFidelityRootCAToSSLConfig(); |
| 397 | 398 | ||
| 398 | _trayIcon->show(); | 399 | _trayIcon->show(); |
| 400 | |||
| 401 | #ifdef HAVE_RTMIDI | ||
| 402 | // setup the MIDIManager | ||
| 403 | MIDIManager& midiManagerInstance = MIDIManager::getInstance(); | ||
| 404 | midiManagerInstance.openDefaultPort(); | ||
| 405 | #endif | ||
| 399 | } | 406 | } |
| 400 | 407 | ||
| 401 | Application::~Application() { | 408 | Application::~Application() { |
| @@ -3625,6 +3632,10 @@ ScriptEngine* Application::loadScript(const QString& scriptName, bool loadScript · 3223 unmodified lines | |||
| 3625 | scriptEngine->registerGlobalObject("AnimationCache", &_animationCache); | 3632 | scriptEngine->registerGlobalObject("AnimationCache", &_animationCache); |
| 3626 | scriptEngine->registerGlobalObject("AudioReflector", &_audioReflector); | 3633 | scriptEngine->registerGlobalObject("AudioReflector", &_audioReflector); |
| 3627 | scriptEngine->registerGlobalObject("Account", AccountScriptingInterface::getInstance()); | 3634 | scriptEngine->registerGlobalObject("Account", AccountScriptingInterface::getInstance()); |
| 3635 | |||
| 3636 | #ifdef HAVE_RTMIDI | ||
| 3637 | scriptEngine->registerGlobalObject("MIDI", &MIDIManager::getInstance()); | ||
| 3638 | #endif | ||
| 3628 | 3639 | ||
| 3629 | QThread* workerThread = new QThread(this); | 3640 | QThread* workerThread = new QThread(this); |
| 3630 | 3641 | ||