From 0772dad02c9221ebdf1a7c9f7febd1233bccbdce Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 15 Jul 2012 18:33:58 +0100 Subject: [PATCH] General fixing, builds again --- Makefile | 2 +- README | 7 +++ src/cadence.py | 2 +- src/carla-backend/Makefile | 2 +- src/carla-backend/linuxsampler.cpp | 42 +++++++++------ src/carla-backend/qtcreator/carla-backend.pro | 6 +-- src/carla-discovery/carla-discovery.cpp | 21 ++++---- src/carla-includes/carla_vst_includes.h | 52 +++++++++++++++++-- src/carla.py | 12 ++++- src/carla_backend.py | 2 + src/catia.py | 3 +- src/claudia.py | 14 ++++- src/jackmeter.py | 2 +- src/pixmapdial.py | 7 +-- src/pixmapkeyboard.py | 1 + src/systray.py | 36 ++++++++++--- src/ui/xycontroller.ui | 3 +- src/xycontroller.py | 4 +- 18 files changed, 164 insertions(+), 54 deletions(-) diff --git a/Makefile b/Makefile index 4c478e9..e0d885d 100644 --- a/Makefile +++ b/Makefile @@ -165,7 +165,7 @@ carla_backend: carla_lilv $(MAKE) -C src/carla-backend carla_bridge: carla_lilv - $(MAKE) -C src/carla-bridge +# $(MAKE) -C src/carla-bridge carla_discovery: $(MAKE) -C src/carla-discovery unix$(_arch_n) NATIVE=1 diff --git a/README b/README index 0dabe6c..52a1d52 100644 --- a/README +++ b/README @@ -4,3 +4,10 @@ Cadence is a set of tools useful for audio production. It's being developed by falkTX, using Python and Qt (and some C++ where needed). + +needs: +pyqt4-dev-tools +libqt4-dev +liblo-dev +libgtk2.0-dev +python3-pyqt4 diff --git a/src/cadence.py b/src/cadence.py index e031436..9fdcc52 100755 --- a/src/cadence.py +++ b/src/cadence.py @@ -819,4 +819,4 @@ if __name__ == '__main__': gui.show() # Exit properly - sys.exit(app.exec_()) + sys.exit(gui.systray.exec_(app)) diff --git a/src/carla-backend/Makefile b/src/carla-backend/Makefile index 84cefbf..47620a6 100644 --- a/src/carla-backend/Makefile +++ b/src/carla-backend/Makefile @@ -20,7 +20,7 @@ CARLA_C_FLAGS = $(BASE_FLAGS) $(CFLAGS) CARLA_CXX_FLAGS = $(BASE_FLAGS) -std=c++0x $(CXXFLAGS) CARLA_CXX_FLAGS += $(shell pkg-config --cflags liblo QtCore QtGui) CARLA_CXX_FLAGS += -DNDEBUG -DQT_NO_DEBUG -DQT_NO_DEBUG_STREAM -DQT_NO_DEBUG_OUTPUT -# CARLA_CXX_FLAGS += -DVESTIGE_HEADER -I../carla-includes/vestige # Comment this line to not use vestige header +CARLA_CXX_FLAGS += -DVESTIGE_HEADER -I../carla-includes/vestige # Comment this line to not use vestige header CARLA_LD_FLAGS = -shared -ldl -lm -fPIC $(LDFLAGS) CARLA_LD_FLAGS += $(shell pkg-config --libs liblo QtCore QtGui) diff --git a/src/carla-backend/linuxsampler.cpp b/src/carla-backend/linuxsampler.cpp index dc028bb..c1387d9 100644 --- a/src/carla-backend/linuxsampler.cpp +++ b/src/carla-backend/linuxsampler.cpp @@ -21,6 +21,8 @@ // TODO - setMidiProgram() +#ifdef WANT_LINUXSAMPLER + #include "carla_plugin.h" #include "carla_linuxsampler_includes.h" @@ -32,8 +34,6 @@ CARLA_BACKEND_START_NAMESPACE } /* adjust editor indent */ #endif -#ifdef WANT_LINUXSAMPLER - /*! * @defgroup CarlaBackendLinuxSamplerPlugin Carla Backend LinuxSampler Plugin * @@ -57,8 +57,8 @@ public: engine_channel = nullptr; instrument = nullptr; - audioOutputDevice = new AudioOutputDevicePlugin(this); - midiInputDevice = new MidiInputDevicePlugin(sampler); + audioOutputDevice = new LinuxSampler::AudioOutputDevicePlugin(engine_, this); + midiInputDevice = new LinuxSampler::MidiInputDevicePlugin(sampler); midiInputPort = midiInputDevice->CreateMidiPort(); m_isGIG = isGIG; @@ -283,7 +283,7 @@ public: for (i=0; i < MAX_MIDI_EVENTS && midiEventCount < MAX_MIDI_EVENTS; i++) { - if (! extMidiNotes[i].valid) + if (extMidiNotes[i].channel < 0) break; if (extMidiNotes[i].velo) @@ -291,7 +291,7 @@ public: else midiInputPort->DispatchNoteOff(extMidiNotes[i].note, extMidiNotes[i].velo, cin_channel, framesOffset); - extMidiNotes[i].valid = false; + extMidiNotes[i].channel = -1; midiEventCount += 1; } @@ -558,8 +558,8 @@ private: LinuxSampler::InstrumentManager* instrument; std::vector instrumentIds; - AudioOutputDevicePlugin* audioOutputDevice; - MidiInputDevicePlugin* midiInputDevice; + LinuxSampler::AudioOutputDevicePlugin* audioOutputDevice; + LinuxSampler::MidiInputDevicePlugin* midiInputDevice; LinuxSampler::MidiInputPort* midiInputPort; bool m_isGIG; @@ -571,7 +571,7 @@ CarlaPlugin* LinuxSamplerPlugin::newLinuxSampler(const initializer& init, bool i { qDebug("LinuxSamplerPlugin::newLinuxSampler(%p, %s, %s, %s, %s)", init.engine, init.filename, init.name, init.label, bool2str(isGIG)); - short id = init.engine->getNewPluginIndex(); + short id = init.engine->getNewPluginId(); if (id < 0) { @@ -592,29 +592,37 @@ CarlaPlugin* LinuxSamplerPlugin::newLinuxSampler(const initializer& init, bool i return plugin; } -#endif CarlaPlugin* CarlaPlugin::newGIG(const initializer& init) { qDebug("CarlaPlugin::newGIG(%p, %s, %s, %s)", init.engine, init.filename, init.name, init.label); -#ifdef WANT_LINUXSAMPLER return LinuxSamplerPlugin::newLinuxSampler(init, true); -#else +} + +CarlaPlugin* CarlaPlugin::newSFZ(const initializer& init) +{ + qDebug("CarlaPlugin::newSFZ(%p, %s, %s, %s)", init.engine, init.filename, init.name, init.label); + return LinuxSamplerPlugin::newLinuxSampler(init, false); +} +#else // WANT_LINUXSAMPLER +#include "carla_plugin.h" + +CARLA_BACKEND_START_NAMESPACE + +CarlaPlugin* CarlaPlugin::newGIG(const initializer& init) +{ + qDebug("CarlaPlugin::newGIG(%p, %s, %s, %s)", init.engine, init.filename, init.name, init.label); setLastError("linuxsampler support not available"); return nullptr; -#endif } CarlaPlugin* CarlaPlugin::newSFZ(const initializer& init) { qDebug("CarlaPlugin::newSFZ(%p, %s, %s, %s)", init.engine, init.filename, init.name, init.label); -#ifdef WANT_LINUXSAMPLER - return LinuxSamplerPlugin::newLinuxSampler(init, false); -#else setLastError("linuxsampler support not available"); return nullptr; -#endif } +#endif /**@}*/ diff --git a/src/carla-backend/qtcreator/carla-backend.pro b/src/carla-backend/qtcreator/carla-backend.pro index 75e313a..24ee93c 100644 --- a/src/carla-backend/qtcreator/carla-backend.pro +++ b/src/carla-backend/qtcreator/carla-backend.pro @@ -3,8 +3,8 @@ QT = core gui CONFIG = debug link_pkgconfig qt warn_on plugin shared -PKGCONFIG = jack liblo fluidsynth alsa libpulse-simple -# linuxsampler suil-0 +PKGCONFIG = jack liblo fluidsynth linuxsampler alsa libpulse-simple +# suil-0 TARGET = carla_backend TEMPLATE = app @@ -52,7 +52,7 @@ INCLUDEPATH = .. \ #DEFINES += HAVE_SUIL DEFINES += WANT_FLUIDSYNTH -#DEFINES += WANT_LINUXSAMPLER +DEFINES += WANT_LINUXSAMPLER DEFINES += CARLA_ENGINE_JACK #DEFINES += CARLA_ENGINE_RTAUDIO DEFINES += QTCREATOR_TEST diff --git a/src/carla-discovery/carla-discovery.cpp b/src/carla-discovery/carla-discovery.cpp index 6c352d9..fac31d4 100644 --- a/src/carla-discovery/carla-discovery.cpp +++ b/src/carla-discovery/carla-discovery.cpp @@ -17,7 +17,6 @@ #include "carla_includes.h" #include "carla_lib_includes.h" -#include "carla_vst_includes.h" #include #include @@ -29,9 +28,11 @@ #include #include -#include "ladspa/ladspa.h" +#include "carla_ladspa_includes.h" +#include "carla_lv2_includes.h" +#include "carla_vst_includes.h" + #include "dssi/dssi.h" -#include "lv2_rdf.h" #ifdef BUILD_NATIVE # ifdef WANT_FLUIDSYNTH @@ -40,21 +41,21 @@ # warning fluidsynth not available (no SF2 support) # endif # ifdef WANT_LINUXSAMPLER -# include "linuxsampler/EngineFactory.h" +# define BUILD_BRIDGE // FIXME +# include "carla_linuxsampler_includes.h" +# undef BUILD_BRIDGE # else # warning linuxsampler not available (no GIG and SFZ support) # endif #endif -#define CARLA_BACKEND_NO_EXPORTS -#define CARLA_BACKEND_NO_NAMESPACE #include "carla_backend.h" #define DISCOVERY_OUT(x, y) std::cout << "\ncarla-discovery::" << x << "::" << y << std::endl; // fake values to test plugins with const uint32_t bufferSize = 512; -const double sampleRate = 44100.f; +const double sampleRate = 44100.0; // Since discovery can find multi-architecture binaries, don't print ELF related errors void print_lib_error(const char* filename) @@ -64,6 +65,8 @@ void print_lib_error(const char* filename) DISCOVERY_OUT("error", error); } +using namespace CarlaBackend; + // ------------------------------ VST Stuff ------------------------------ intptr_t VstCurrentUniqueId = 0; @@ -71,7 +74,7 @@ intptr_t VstCurrentUniqueId = 0; intptr_t VstHostCallback(AEffect* effect, int32_t opcode, int32_t index, intptr_t value, void* ptr, float opt) { #if DEBUG - qDebug("VstHostCallback(%p, opcode: %s, index: %i, value: " P_INTPTR ", opt: %f", effect, VstOpcode2str(opcode), index, value, opt); + qDebug("VstHostCallback(%p, opcode: %s, index: %i, value: " P_INTPTR ", opt: %f", effect, VstMasterOpcode2str(opcode), index, value, opt); #endif switch (opcode) @@ -177,7 +180,7 @@ intptr_t VstHostCallback(AEffect* effect, int32_t opcode, int32_t index, intptr_ return kVstLangEnglish; default: - qDebug("VstHostCallback(%p, opcode: %s, index: %i, value: " P_INTPTR ", opt: %f", effect, VstOpcode2str(opcode), index, value, opt); + qDebug("VstHostCallback(%p, opcode: %s, index: %i, value: " P_INTPTR ", opt: %f", effect, VstMasterOpcode2str(opcode), index, value, opt); break; } diff --git a/src/carla-includes/carla_vst_includes.h b/src/carla-includes/carla_vst_includes.h index c8569fc..92235e3 100644 --- a/src/carla-includes/carla_vst_includes.h +++ b/src/carla-includes/carla_vst_includes.h @@ -25,19 +25,66 @@ #if VESTIGE_HEADER #warning Using vestige header +#define audioMasterGetOutputSpeakerArrangement audioMasterGetSpeakerArrangement #define effFlagsProgramChunks (1 << 5) +#define effSetProgramName 4 #define effGetParamLabel 6 #define effGetParamDisplay 7 +#define effGetVu 9 +#define effEditDraw 16 +#define effEditMouse 17 +#define effEditKey 18 +#define effEditSleep 21 +#define effIdentify 22 #define effGetChunk 23 #define effSetChunk 24 #define effCanBeAutomated 26 +#define effString2Parameter 27 +#define effGetNumProgramCategories 28 #define effGetProgramNameIndexed 29 +#define effCopyProgram 30 +#define effConnectInput 31 +#define effConnectOutput 32 +#define effGetInputProperties 33 +#define effGetOutputProperties 34 #define effGetPlugCategory 35 +#define effGetCurrentPosition 36 +#define effGetDestinationBuffer 37 +#define effOfflineNotify 38 +#define effOfflinePrepare 39 +#define effOfflineRun 40 +#define effProcessVarIo 41 +#define effSetSpeakerArrangement 42 #define effSetBlockSizeAndSampleRate 43 +#define effSetBypass 44 +#define effGetErrorText 46 +#define effVendorSpecific 50 +#define effGetTailSize 52 +#define effIdle 53 +#define effGetIcon 54 +#define effSetViewPosition 55 +#define effKeysRequired 57 +#define effEditKeyDown 59 +#define effEditKeyUp 60 +#define effSetEditKnobMode 61 +#define effGetMidiProgramName 62 +#define effGetCurrentMidiProgram 63 +#define effGetMidiProgramCategory 64 +#define effHasMidiProgramsChanged 65 +#define effGetMidiKeyName 66 +#define effBeginSetProgram 67 +#define effEndSetProgram 68 +#define effGetSpeakerArrangement 69 #define effShellGetNextPlugin 70 #define effStartProcess 71 #define effStopProcess 72 +#define effSetTotalSampleToProcess 73 +#define effSetPanLaw 74 +#define effBeginLoadBank 75 +#define effBeginLoadProgram 76 #define effSetProcessPrecision 77 +#define effGetNumMidiInputChannels 78 +#define effGetNumMidiOutputChannels 79 #define kPlugCategSynth 2 #define kPlugCategAnalysis 3 #define kPlugCategMastering 4 @@ -52,7 +99,6 @@ #define kVstProcessPrecision32 0 #define kVstTransportChanged 1 #define kVstVersion 2400 -//#define audioMasterGetOutputSpeakerArrangement audioMasterGetSpeakerArrangement struct ERect { short top, left, bottom, right; }; @@ -332,11 +378,7 @@ const char* VstMasterOpcode2str(const int32_t opcode) #if ! VST_FORCE_DEPRECATED case audioMasterSetOutputSampleRate: return "audioMasterSetOutputSampleRate"; -#ifdef VESTIGE_HEADER - case audioMasterGetSpeakerArrangement: -#else case audioMasterGetOutputSpeakerArrangement: -#endif return "audioMasterGetOutputSpeakerArrangement"; #endif case audioMasterGetVendorString: diff --git a/src/carla.py b/src/carla.py index a70c40b..a10b2c0 100755 --- a/src/carla.py +++ b/src/carla.py @@ -3430,7 +3430,8 @@ class CarlaMainW(QMainWindow, ui_carla.Ui_CarlaMainW): if event.timerId() == self.TIMER_GUI_STUFF: for pwidget in self.m_plugin_list: if pwidget: pwidget.check_gui_stuff() - CarlaHost.idle_guis() + if CarlaHost.is_engine_running(): + CarlaHost.idle_guis() elif event.timerId() == self.TIMER_GUI_STUFF2: for pwidget in self.m_plugin_list: if pwidget: pwidget.check_gui_stuff2() @@ -3514,8 +3515,15 @@ if __name__ == '__main__': if carla_bridge_vst_x11: CarlaHost.set_option(OPTION_PATH_BRIDGE_VST_X11, 0, carla_bridge_vst_x11) + # TEST + #count = CarlaHost.get_engine_driver_count() + #print(count) + #for i in range(0, count): + #dname = cString(CarlaHost.get_engine_driver_name(i)) + #print("%i - %s" % (i, dname)) + if not CarlaHost.engine_init("JACK", "Carla"): - CustomMessageBox(None, QMessageBox.Critical, "Error", "Could not connect to JACK", + CustomMessageBox(None, QMessageBox.Critical, "Error", "Could not connect to Audio backend, possible reasons:", cString(CarlaHost.get_last_error()), QMessageBox.Ok, QMessageBox.Ok) sys.exit(1) diff --git a/src/carla_backend.py b/src/carla_backend.py index 7993985..e36cdc5 100644 --- a/src/carla_backend.py +++ b/src/carla_backend.py @@ -779,6 +779,8 @@ class Host(object): if lib_prefix_arg: carla_library_path = os.path.join(lib_prefix_arg, "lib", "carla", carla_libname) + print("Host() - using carla-backend library '%s'" % carla_library_path) + self.lib = cdll.LoadLibrary(carla_library_path) self.lib.get_engine_driver_count.argtypes = None diff --git a/src/catia.py b/src/catia.py index 9039e41..97ec7db 100755 --- a/src/catia.py +++ b/src/catia.py @@ -1309,8 +1309,9 @@ if __name__ == '__main__': else: DBus.jack = None - DBus.a2j = None + DBus.a2j = None a2j_client_name = None + print("Not using DBus") # Show GUI gui = CatiaMainW() diff --git a/src/claudia.py b/src/claudia.py index 5772484..681baf9 100755 --- a/src/claudia.py +++ b/src/claudia.py @@ -17,8 +17,6 @@ # For a full copy of the GNU General Public License see the COPYING file # Imports (Global) -import dbus -from dbus.mainloop.qt import DBusQtMainLoop from time import ctime from PyQt4.QtCore import QPointF, QSettings from PyQt4.QtGui import QAction, QApplication, QMainWindow, QVBoxLayout, QTableWidgetItem, QTreeWidgetItem @@ -40,6 +38,13 @@ try: except: hasGL = False +try: + import dbus + from dbus.mainloop.qt import DBusQtMainLoop + haveDBus = True +except: + haveDBus = False + # NOTE - set to true when supported USE_CLAUDIA_ADD_NEW = True @@ -2485,6 +2490,11 @@ if __name__ == '__main__': app.setOrganizationName("Cadence") app.setWindowIcon(QIcon(":/scalable/claudia.svg")) + if not haveDBus: + QMessageBox.critical(None, app.translate("ClaudiaMainW", "Error"), app.translate("ClaudiaMainW", + "DBus is not available, Claudia cannot start without it!")) + sys.exit(1) + DBus.loop = DBusQtMainLoop(set_as_default=True) DBus.bus = dbus.SessionBus(mainloop=DBus.loop) DBus.jack = DBus.bus.get_object("org.jackaudio.service", "/org/jackaudio/Controller") diff --git a/src/jackmeter.py b/src/jackmeter.py index 9873bd8..d6640bc 100755 --- a/src/jackmeter.py +++ b/src/jackmeter.py @@ -139,7 +139,7 @@ if __name__ == '__main__': # JACK initialization jack_status = jacklib.jack_status_t(0) - client = jacklib.client_open("M", jacklib.JackSessionID, jacklib.pointer(jack_status)) + client = jacklib.client_open("M", jacklib.JackNoStartServer|jacklib.JackSessionID, jacklib.pointer(jack_status)) if not client: errorString = get_jack_status_error_string(jack_status) diff --git a/src/pixmapdial.py b/src/pixmapdial.py index 3645c11..633c0ab 100644 --- a/src/pixmapdial.py +++ b/src/pixmapdial.py @@ -56,9 +56,10 @@ class PixmapDial(QDial): if self.palette().window().color().lightness() > 100: # Light background - self.m_color1 = QColor(100, 100, 100, 255) - self.m_color2 = QColor(0, 0, 0, 0) - self.m_colorT = [self.palette().text().color(), self.palette().mid().color()] + c = self.palette().dark().color() + self.m_color1 = c + self.m_color2 = QColor(c.red(), c.green(), c.blue(), 0) + self.m_colorT = [self.palette().buttonText().color(), self.palette().mid().color()] else: # Dark background self.m_color1 = QColor(0, 0, 0, 255) diff --git a/src/pixmapkeyboard.py b/src/pixmapkeyboard.py index 5a17fb2..f12a19f 100644 --- a/src/pixmapkeyboard.py +++ b/src/pixmapkeyboard.py @@ -99,6 +99,7 @@ class PixmapKeyboard(QWidget): self.m_font = QFont("Monospace", 8, QFont.Normal) self.m_pixmap = QPixmap("") + self.setCursor(Qt.PointingHandCursor) self.setMode(self.HORIZONTAL) def sendNoteOn(self, note, sendSignal=True): diff --git a/src/systray.py b/src/systray.py index 91c19de..06a9ab0 100644 --- a/src/systray.py +++ b/src/systray.py @@ -17,17 +17,41 @@ # For a full copy of the GNU General Public License see the COPYING file # Imports (Global) -from os import getenv +import os, sys from PyQt4.QtCore import SIGNAL from PyQt4.QtGui import QAction, QIcon, QMenu, QSystemTrayIcon try: - if getenv("DESKTOP_SESSION") in ("ubuntu", "ubuntu-2d") and not os.path.exists("/var/kxstudio/no_appindicators"): - from gi.repository import AppIndicator3, Gtk + if os.getenv("DESKTOP_SESSION") in ("ubuntu", "ubuntu-2d") and not os.path.exists("/var/cadence/no_appindicators"): + # Check current Qt theme. If Gtk+, use Gtk2 AppIndicator + style = None + if len(sys.argv) > 2 and "-style" in sys.argv: + i = sys.argv.index("-style") + if i < len(sys.argv): + style = sys.argv[i+1] + + check_cmd = "python3 -c 'import sys; from PyQt4.QtGui import QApplication; app = QApplication(sys.argv); print(app.style().objectName())'" + if style: + check_cmd += " -style " + check_cmd += style + + from subprocess import getoutput + needsGtk2 = bool(getoutput(check_cmd).strip().lower() in ("gtk", "gtk+")) + + if needsGtk2: + from gi import pygtkcompat + pygtkcompat.enable() + pygtkcompat.enable_gtk(version="2.0") + from gi.repository import Gtk, AppIndicator + else: + from gi.repository import Gtk, AppIndicator3 as AppIndicator + TrayEngine = "AppIndicator" + elif getenv("KDE_FULL_SESSION"): from PyKDE4.kdeui import KAction, KIcon, KMenu, KStatusNotifierItem TrayEngine = "KDE" + else: TrayEngine = "Qt" except: @@ -80,7 +104,7 @@ class GlobalSysTray(object): elif TrayEngine == "AppIndicator": self.menu = Gtk.Menu() - self.tray = AppIndicator3.Indicator.new(name, icon, AppIndicator3.IndicatorCategory.APPLICATION_STATUS) + self.tray = AppIndicator.Indicator.new(name, icon, AppIndicator.IndicatorCategory.APPLICATION_STATUS) self.tray.set_menu(self.menu) # Double-click is not possible with App-Indicators @@ -484,7 +508,7 @@ class GlobalSysTray(object): if TrayEngine == "KDE": self.tray.setStatus(KStatusNotifierItem.Active) elif TrayEngine == "AppIndicator": - self.tray.set_status(AppIndicator3.IndicatorStatus.ACTIVE) + self.tray.set_status(AppIndicator.IndicatorStatus.ACTIVE) elif TrayEngine == "Qt": self.tray.show() @@ -492,7 +516,7 @@ class GlobalSysTray(object): if TrayEngine == "KDE": self.tray.setStatus(KStatusNotifierItem.Passive) elif TrayEngine == "AppIndicator": - self.tray.set_status(AppIndicator3.IndicatorStatus.PASSIVE) + self.tray.set_status(AppIndicator.IndicatorStatus.PASSIVE) elif TrayEngine == "Qt": self.tray.hide() diff --git a/src/ui/xycontroller.ui b/src/ui/xycontroller.ui index 3cf6785..a7ecd81 100644 --- a/src/ui/xycontroller.ui +++ b/src/ui/xycontroller.ui @@ -217,6 +217,7 @@ 64 + @@ -231,7 +232,7 @@ 0 0 588 - 21 + 20 diff --git a/src/xycontroller.py b/src/xycontroller.py index 0b53d34..b9a0a51 100755 --- a/src/xycontroller.py +++ b/src/xycontroller.py @@ -206,6 +206,7 @@ class XYGraphicsScene(QGraphicsScene): def mousePressEvent(self, event): self.m_mouseLock = True self.handleMousePos(event.scenePos()) + self.parent().setCursor(Qt.CrossCursor) QGraphicsScene.mousePressEvent(self, event) def mouseMoveEvent(self, event): @@ -214,6 +215,7 @@ class XYGraphicsScene(QGraphicsScene): def mouseReleaseEvent(self, event): self.m_mouseLock = False + self.parent().setCursor(Qt.ArrowCursor) QGraphicsScene.mouseReleaseEvent(self, event) # XY Controller Window @@ -605,7 +607,7 @@ if __name__ == '__main__': # Start jack jack_status = jacklib.jack_status_t(0) - jack_client = jacklib.client_open("XY-Controller", jacklib.JackSessionID, jacklib.pointer(jack_status)) + jack_client = jacklib.client_open("XY-Controller", jacklib.JackNoStartServer|jacklib.JackSessionID, jacklib.pointer(jack_status)) if not jack_client: errorString = get_jack_status_error_string(jack_status)