| @@ -56,9 +56,7 @@ ALL_LIBS += $(MODULEDIR)/carla_plugin.a | |||
| ALL_LIBS += $(MODULEDIR)/jackbridge.a | |||
| ALL_LIBS += $(MODULEDIR)/native-plugins.a | |||
| ALL_LIBS += $(MODULEDIR)/juce_audio_basics.a | |||
| ALL_LIBS += $(MODULEDIR)/juce_audio_formats.a | |||
| ALL_LIBS += $(MODULEDIR)/juce_core.a | |||
| ALL_LIBS += $(MODULEDIR)/juce_events.a | |||
| ALL_LIBS += $(MODULEDIR)/lilv.a | |||
| ALL_LIBS += $(MODULEDIR)/rtmempool.a | |||
| @@ -70,19 +68,8 @@ ifeq ($(HAVE_HYLIA),true) | |||
| ALL_LIBS += $(MODULEDIR)/hylia.a | |||
| endif | |||
| ifeq ($(MACOS_OR_WIN32),true) | |||
| ALL_LIBS += $(MODULEDIR)/juce_audio_devices.a | |||
| ALL_LIBS += $(MODULEDIR)/juce_audio_processors.a | |||
| ALL_LIBS += $(MODULEDIR)/juce_data_structures.a | |||
| ALL_LIBS += $(MODULEDIR)/juce_graphics.a | |||
| ALL_LIBS += $(MODULEDIR)/juce_gui_basics.a | |||
| ifeq ($(MACOS),true) | |||
| ALL_LIBS += $(MODULEDIR)/juce_gui_extra.a | |||
| endif | |||
| else | |||
| ALL_LIBS += $(MODULEDIR)/rtaudio.a | |||
| ALL_LIBS += $(MODULEDIR)/rtmidi.a | |||
| endif | |||
| ifeq ($(HAVE_QT4),true) | |||
| ALL_LIBS += $(MODULEDIR)/theme.qt4.a | |||
| @@ -165,18 +152,9 @@ theme: libs | |||
| LIBS_POSIX32 = $(MODULEDIR)/jackbridge.posix32.a | |||
| LIBS_POSIX32 += $(MODULEDIR)/juce_audio_basics.posix32.a | |||
| LIBS_POSIX32 += $(MODULEDIR)/juce_core.posix32.a | |||
| LIBS_POSIX32 += $(MODULEDIR)/juce_events.posix32.a | |||
| LIBS_POSIX32 += $(MODULEDIR)/lilv.posix32.a | |||
| LIBS_POSIX32 += $(MODULEDIR)/rtmempool.posix32.a | |||
| ifeq ($(MACOS),true) | |||
| LIBS_POSIX32 += $(MODULEDIR)/juce_audio_processors.posix32.a | |||
| LIBS_POSIX32 += $(MODULEDIR)/juce_data_structures.posix32.a | |||
| LIBS_POSIX32 += $(MODULEDIR)/juce_graphics.posix32.a | |||
| LIBS_POSIX32 += $(MODULEDIR)/juce_gui_basics.posix32.a | |||
| LIBS_POSIX32 += $(MODULEDIR)/juce_gui_extra.posix32.a | |||
| endif | |||
| posix32: $(LIBS_POSIX32) | |||
| $(MAKE) -C source/bridges-plugin posix32 | |||
| $(MAKE) -C source/discovery posix32 | |||
| @@ -187,18 +165,9 @@ posix32: $(LIBS_POSIX32) | |||
| LIBS_POSIX64 = $(MODULEDIR)/jackbridge.posix64.a | |||
| LIBS_POSIX64 += $(MODULEDIR)/juce_audio_basics.posix64.a | |||
| LIBS_POSIX64 += $(MODULEDIR)/juce_core.posix64.a | |||
| LIBS_POSIX64 += $(MODULEDIR)/juce_events.posix64.a | |||
| LIBS_POSIX64 += $(MODULEDIR)/lilv.posix64.a | |||
| LIBS_POSIX64 += $(MODULEDIR)/rtmempool.posix64.a | |||
| ifeq ($(MACOS),true) | |||
| LIBS_POSIX64 += $(MODULEDIR)/juce_audio_processors.posix64.a | |||
| LIBS_POSIX64 += $(MODULEDIR)/juce_data_structures.posix64.a | |||
| LIBS_POSIX64 += $(MODULEDIR)/juce_graphics.posix64.a | |||
| LIBS_POSIX64 += $(MODULEDIR)/juce_gui_basics.posix64.a | |||
| LIBS_POSIX64 += $(MODULEDIR)/juce_gui_extra.posix64.a | |||
| endif | |||
| posix64: $(LIBS_POSIX64) | |||
| $(MAKE) -C source/bridges-plugin posix64 | |||
| $(MAKE) -C source/discovery posix64 | |||
| @@ -212,12 +181,7 @@ else | |||
| LIBS_WIN32 = $(MODULEDIR)/jackbridge.win32e.a | |||
| endif | |||
| LIBS_WIN32 += $(MODULEDIR)/juce_audio_basics.win32.a | |||
| LIBS_WIN32 += $(MODULEDIR)/juce_audio_processors.win32.a | |||
| LIBS_WIN32 += $(MODULEDIR)/juce_core.win32.a | |||
| LIBS_WIN32 += $(MODULEDIR)/juce_data_structures.win32.a | |||
| LIBS_WIN32 += $(MODULEDIR)/juce_events.win32.a | |||
| LIBS_WIN32 += $(MODULEDIR)/juce_graphics.win32.a | |||
| LIBS_WIN32 += $(MODULEDIR)/juce_gui_basics.win32.a | |||
| LIBS_WIN32 += $(MODULEDIR)/lilv.win32.a | |||
| LIBS_WIN32 += $(MODULEDIR)/rtmempool.win32.a | |||
| @@ -234,12 +198,7 @@ else | |||
| LIBS_WIN64 = $(MODULEDIR)/jackbridge.win64e.a | |||
| endif | |||
| LIBS_WIN64 += $(MODULEDIR)/juce_audio_basics.win64.a | |||
| LIBS_WIN64 += $(MODULEDIR)/juce_audio_processors.win64.a | |||
| LIBS_WIN64 += $(MODULEDIR)/juce_core.win64.a | |||
| LIBS_WIN64 += $(MODULEDIR)/juce_data_structures.win64.a | |||
| LIBS_WIN64 += $(MODULEDIR)/juce_events.win64.a | |||
| LIBS_WIN64 += $(MODULEDIR)/juce_graphics.win64.a | |||
| LIBS_WIN64 += $(MODULEDIR)/juce_gui_basics.win64.a | |||
| LIBS_WIN64 += $(MODULEDIR)/lilv.win64.a | |||
| LIBS_WIN64 += $(MODULEDIR)/rtmempool.win64.a | |||
| @@ -290,7 +249,6 @@ RES = \ | |||
| bin/resources/racklistwidget.py \ | |||
| bin/resources/resources_rc.py \ | |||
| bin/resources/ui_carla_about.py \ | |||
| bin/resources/ui_carla_about_juce.py \ | |||
| bin/resources/ui_carla_add_jack.py \ | |||
| bin/resources/ui_carla_database.py \ | |||
| bin/resources/ui_carla_edit.py \ | |||
| @@ -335,7 +293,6 @@ endif | |||
| ifeq ($(HAVE_PYQT),true) | |||
| UIs = \ | |||
| source/ui_carla_about.py \ | |||
| source/ui_carla_about_juce.py \ | |||
| source/ui_carla_add_jack.py \ | |||
| source/ui_carla_database.py \ | |||
| source/ui_carla_edit.py \ | |||
| @@ -667,7 +624,6 @@ endif | |||
| $(LINK) $(DATADIR)/carla/racklistwidget.py $(DESTDIR)$(DATADIR)/carla/resources | |||
| $(LINK) $(DATADIR)/carla/resources_rc.py $(DESTDIR)$(DATADIR)/carla/resources | |||
| $(LINK) $(DATADIR)/carla/ui_carla_about.py $(DESTDIR)$(DATADIR)/carla/resources | |||
| $(LINK) $(DATADIR)/carla/ui_carla_about_juce.py $(DESTDIR)$(DATADIR)/carla/resources | |||
| $(LINK) $(DATADIR)/carla/ui_carla_add_jack.py $(DESTDIR)$(DATADIR)/carla/resources | |||
| $(LINK) $(DATADIR)/carla/ui_carla_database.py $(DESTDIR)$(DATADIR)/carla/resources | |||
| $(LINK) $(DATADIR)/carla/ui_carla_edit.py $(DESTDIR)$(DATADIR)/carla/resources | |||
| @@ -113,6 +113,19 @@ | |||
| <string>Features</string> | |||
| </attribute> | |||
| <layout class="QGridLayout" name="gridLayout"> | |||
| <item row="0" column="1"> | |||
| <widget class="QLabel" name="lid_ladspa"> | |||
| <property name="text"> | |||
| <string>LADSPA:</string> | |||
| </property> | |||
| <property name="textFormat"> | |||
| <enum>Qt::PlainText</enum> | |||
| </property> | |||
| <property name="alignment"> | |||
| <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="6" column="2"> | |||
| <widget class="QLabel" name="l_vst2"> | |||
| <property name="sizePolicy"> | |||
| @@ -132,7 +145,7 @@ | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="11" column="1" colspan="2"> | |||
| <item row="7" column="1" colspan="2"> | |||
| <spacer name="verticalSpacer_3"> | |||
| <property name="orientation"> | |||
| <enum>Qt::Vertical</enum> | |||
| @@ -158,32 +171,6 @@ | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="10" column="1"> | |||
| <widget class="QLabel" name="lid_au"> | |||
| <property name="text"> | |||
| <string>AudioUnit:</string> | |||
| </property> | |||
| <property name="textFormat"> | |||
| <enum>Qt::PlainText</enum> | |||
| </property> | |||
| <property name="alignment"> | |||
| <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="8" column="1"> | |||
| <widget class="QLabel" name="lid_vst3"> | |||
| <property name="text"> | |||
| <string>VST3:</string> | |||
| </property> | |||
| <property name="textFormat"> | |||
| <enum>Qt::PlainText</enum> | |||
| </property> | |||
| <property name="alignment"> | |||
| <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="2" column="1"> | |||
| <widget class="QLabel" name="lid_dssi"> | |||
| <property name="text"> | |||
| @@ -216,38 +203,6 @@ | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="0" column="1"> | |||
| <widget class="QLabel" name="lid_ladspa"> | |||
| <property name="text"> | |||
| <string>LADSPA:</string> | |||
| </property> | |||
| <property name="textFormat"> | |||
| <enum>Qt::PlainText</enum> | |||
| </property> | |||
| <property name="alignment"> | |||
| <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="10" column="2"> | |||
| <widget class="QLabel" name="l_au"> | |||
| <property name="sizePolicy"> | |||
| <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> | |||
| <horstretch>0</horstretch> | |||
| <verstretch>0</verstretch> | |||
| </sizepolicy> | |||
| </property> | |||
| <property name="text"> | |||
| <string>TextLabel</string> | |||
| </property> | |||
| <property name="textFormat"> | |||
| <enum>Qt::PlainText</enum> | |||
| </property> | |||
| <property name="alignment"> | |||
| <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="4" column="1"> | |||
| <widget class="QLabel" name="lid_lv2"> | |||
| <property name="text"> | |||
| @@ -261,25 +216,6 @@ | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="8" column="2"> | |||
| <widget class="QLabel" name="l_vst3"> | |||
| <property name="sizePolicy"> | |||
| <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> | |||
| <horstretch>0</horstretch> | |||
| <verstretch>0</verstretch> | |||
| </sizepolicy> | |||
| </property> | |||
| <property name="text"> | |||
| <string>TextLabel</string> | |||
| </property> | |||
| <property name="textFormat"> | |||
| <enum>Qt::PlainText</enum> | |||
| </property> | |||
| <property name="alignment"> | |||
| <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="4" column="2"> | |||
| <widget class="QLabel" name="l_lv2"> | |||
| <property name="sizePolicy"> | |||
| @@ -389,32 +325,6 @@ | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="7" column="0" colspan="4"> | |||
| <widget class="Line" name="line_vst2"> | |||
| <property name="lineWidth"> | |||
| <number>0</number> | |||
| </property> | |||
| <property name="midLineWidth"> | |||
| <number>1</number> | |||
| </property> | |||
| <property name="orientation"> | |||
| <enum>Qt::Horizontal</enum> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="9" column="0" colspan="4"> | |||
| <widget class="Line" name="line_vst3"> | |||
| <property name="lineWidth"> | |||
| <number>0</number> | |||
| </property> | |||
| <property name="midLineWidth"> | |||
| <number>1</number> | |||
| </property> | |||
| <property name="orientation"> | |||
| <enum>Qt::Horizontal</enum> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| </layout> | |||
| </widget> | |||
| <widget class="QWidget" name="osc"> | |||
| @@ -1,189 +0,0 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <ui version="4.0"> | |||
| <class>JuceAboutW</class> | |||
| <widget class="QDialog" name="JuceAboutW"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>0</x> | |||
| <y>0</y> | |||
| <width>463</width> | |||
| <height>244</height> | |||
| </rect> | |||
| </property> | |||
| <property name="windowTitle"> | |||
| <string>About JUCE</string> | |||
| </property> | |||
| <layout class="QGridLayout" name="gridLayout"> | |||
| <item row="0" column="0"> | |||
| <layout class="QVBoxLayout" name="verticalLayout"> | |||
| <item> | |||
| <widget class="QLabel" name="icon"> | |||
| <property name="minimumSize"> | |||
| <size> | |||
| <width>48</width> | |||
| <height>48</height> | |||
| </size> | |||
| </property> | |||
| <property name="maximumSize"> | |||
| <size> | |||
| <width>48</width> | |||
| <height>48</height> | |||
| </size> | |||
| </property> | |||
| <property name="text"> | |||
| <string/> | |||
| </property> | |||
| <property name="pixmap"> | |||
| <pixmap resource="../resources.qrc">:/48x48/juce.png</pixmap> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item> | |||
| <spacer name="verticalSpacer"> | |||
| <property name="orientation"> | |||
| <enum>Qt::Vertical</enum> | |||
| </property> | |||
| <property name="sizeHint" stdset="0"> | |||
| <size> | |||
| <width>20</width> | |||
| <height>40</height> | |||
| </size> | |||
| </property> | |||
| </spacer> | |||
| </item> | |||
| </layout> | |||
| </item> | |||
| <item row="0" column="1"> | |||
| <layout class="QVBoxLayout" name="verticalLayout_2"> | |||
| <item> | |||
| <widget class="QLabel" name="l_text1"> | |||
| <property name="text"> | |||
| <string><b>About JUCE</b></string> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item> | |||
| <spacer name="verticalSpacer_3"> | |||
| <property name="orientation"> | |||
| <enum>Qt::Vertical</enum> | |||
| </property> | |||
| <property name="sizeType"> | |||
| <enum>QSizePolicy::Fixed</enum> | |||
| </property> | |||
| <property name="sizeHint" stdset="0"> | |||
| <size> | |||
| <width>10</width> | |||
| <height>10</height> | |||
| </size> | |||
| </property> | |||
| </spacer> | |||
| </item> | |||
| <item> | |||
| <widget class="QLabel" name="l_text2"> | |||
| <property name="text"> | |||
| <string>This program uses JUCE version 3.x.x.</string> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item> | |||
| <spacer name="verticalSpacer_4"> | |||
| <property name="orientation"> | |||
| <enum>Qt::Vertical</enum> | |||
| </property> | |||
| <property name="sizeType"> | |||
| <enum>QSizePolicy::Fixed</enum> | |||
| </property> | |||
| <property name="sizeHint" stdset="0"> | |||
| <size> | |||
| <width>10</width> | |||
| <height>10</height> | |||
| </size> | |||
| </property> | |||
| </spacer> | |||
| </item> | |||
| <item> | |||
| <widget class="QLabel" name="l_text3"> | |||
| <property name="text"> | |||
| <string>JUCE (Jules' Utility Class Extensions) is an all-encompassing C++ class library for developing cross-platform software. | |||
| It contains pretty much everything you're likely to need to create most applications, and is particularly well-suited for building highly-customised GUIs, and for handling graphics and sound. | |||
| JUCE is licensed under the GNU Public Licence version 2.0. | |||
| One module (juce_core) is permissively licensed under the ISC. | |||
| Copyright (C) 2017 ROLI Ltd.</string> | |||
| </property> | |||
| <property name="wordWrap"> | |||
| <bool>true</bool> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item> | |||
| <spacer name="verticalSpacer_2"> | |||
| <property name="orientation"> | |||
| <enum>Qt::Vertical</enum> | |||
| </property> | |||
| <property name="sizeType"> | |||
| <enum>QSizePolicy::Expanding</enum> | |||
| </property> | |||
| <property name="sizeHint" stdset="0"> | |||
| <size> | |||
| <width>0</width> | |||
| <height>0</height> | |||
| </size> | |||
| </property> | |||
| </spacer> | |||
| </item> | |||
| </layout> | |||
| </item> | |||
| <item row="1" column="0" colspan="2"> | |||
| <widget class="QDialogButtonBox" name="buttonBox"> | |||
| <property name="orientation"> | |||
| <enum>Qt::Horizontal</enum> | |||
| </property> | |||
| <property name="standardButtons"> | |||
| <set>QDialogButtonBox::Ok</set> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| </layout> | |||
| </widget> | |||
| <resources> | |||
| <include location="../resources.qrc"/> | |||
| <include location="../resources.qrc"/> | |||
| </resources> | |||
| <connections> | |||
| <connection> | |||
| <sender>buttonBox</sender> | |||
| <signal>accepted()</signal> | |||
| <receiver>JuceAboutW</receiver> | |||
| <slot>accept()</slot> | |||
| <hints> | |||
| <hint type="sourcelabel"> | |||
| <x>248</x> | |||
| <y>254</y> | |||
| </hint> | |||
| <hint type="destinationlabel"> | |||
| <x>157</x> | |||
| <y>274</y> | |||
| </hint> | |||
| </hints> | |||
| </connection> | |||
| <connection> | |||
| <sender>buttonBox</sender> | |||
| <signal>rejected()</signal> | |||
| <receiver>JuceAboutW</receiver> | |||
| <slot>reject()</slot> | |||
| <hints> | |||
| <hint type="sourcelabel"> | |||
| <x>316</x> | |||
| <y>260</y> | |||
| </hint> | |||
| <hint type="destinationlabel"> | |||
| <x>286</x> | |||
| <y>274</y> | |||
| </hint> | |||
| </hints> | |||
| </connection> | |||
| </connections> | |||
| </ui> | |||
| @@ -82,13 +82,6 @@ | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="7" column="0"> | |||
| <widget class="QCheckBox" name="ch_au"> | |||
| <property name="text"> | |||
| <string>AU</string> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="3" column="1"> | |||
| <widget class="QCheckBox" name="ch_midi"> | |||
| <property name="text"> | |||
| @@ -166,20 +159,13 @@ | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="8" column="0"> | |||
| <item row="6" column="0"> | |||
| <widget class="QCheckBox" name="ch_kits"> | |||
| <property name="text"> | |||
| <string>Sound Kits</string> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="6" column="0"> | |||
| <widget class="QCheckBox" name="ch_vst3"> | |||
| <property name="text"> | |||
| <string>VST3</string> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item row="1" column="1"> | |||
| <widget class="QCheckBox" name="ch_effects"> | |||
| <property name="text"> | |||
| @@ -202,7 +202,7 @@ | |||
| <x>0</x> | |||
| <y>0</y> | |||
| <width>1058</width> | |||
| <height>20</height> | |||
| <height>30</height> | |||
| </rect> | |||
| </property> | |||
| <widget class="QMenu" name="menu_File"> | |||
| @@ -266,9 +266,6 @@ | |||
| <addaction name="act_canvas_zoom_out"/> | |||
| <addaction name="act_canvas_zoom_100"/> | |||
| </widget> | |||
| <addaction name="act_canvas_show_internal"/> | |||
| <addaction name="act_canvas_show_external"/> | |||
| <addaction name="separator"/> | |||
| <addaction name="act_canvas_arrange"/> | |||
| <addaction name="act_canvas_refresh"/> | |||
| <addaction name="menu_Canvas_Zoom"/> | |||
| @@ -291,7 +288,6 @@ | |||
| <string>&Help</string> | |||
| </property> | |||
| <addaction name="act_help_about"/> | |||
| <addaction name="act_help_about_juce"/> | |||
| <addaction name="act_help_about_qt"/> | |||
| </widget> | |||
| <addaction name="menu_File"/> | |||
| @@ -6,8 +6,8 @@ | |||
| <rect> | |||
| <x>0</x> | |||
| <y>0</y> | |||
| <width>556</width> | |||
| <height>311</height> | |||
| <width>567</width> | |||
| <height>326</height> | |||
| </rect> | |||
| </property> | |||
| <property name="windowTitle"> | |||
| @@ -71,20 +71,6 @@ | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item> | |||
| <widget class="QCheckBox" name="ch_vst3"> | |||
| <property name="text"> | |||
| <string>VST3</string> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item> | |||
| <widget class="QCheckBox" name="ch_au"> | |||
| <property name="text"> | |||
| <string>AU</string> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item> | |||
| <widget class="Line" name="line_3"> | |||
| <property name="lineWidth"> | |||
| @@ -7,7 +7,7 @@ | |||
| <x>0</x> | |||
| <y>0</y> | |||
| <width>612</width> | |||
| <height>484</height> | |||
| <height>587</height> | |||
| </rect> | |||
| </property> | |||
| <property name="minimumSize"> | |||
| @@ -797,11 +797,6 @@ | |||
| <string>Continuous Rack</string> | |||
| </property> | |||
| </item> | |||
| <item> | |||
| <property name="text"> | |||
| <string>Patchbay</string> | |||
| </property> | |||
| </item> | |||
| </widget> | |||
| </item> | |||
| </layout> | |||
| @@ -821,11 +816,6 @@ | |||
| <string>Continuous Rack</string> | |||
| </property> | |||
| </item> | |||
| <item> | |||
| <property name="text"> | |||
| <string>Patchbay</string> | |||
| </property> | |||
| </item> | |||
| </widget> | |||
| </item> | |||
| </layout> | |||
| @@ -1151,11 +1141,6 @@ | |||
| <string>VST</string> | |||
| </property> | |||
| </item> | |||
| <item> | |||
| <property name="text"> | |||
| <string>VST3</string> | |||
| </property> | |||
| </item> | |||
| <item> | |||
| <property name="text"> | |||
| <string>GIG</string> | |||
| @@ -7,9 +7,6 @@ | |||
| # -------------------------------------------------------------- | |||
| # Modify to enable/disable specific features | |||
| # Use the free vestige header instead of the official VST SDK | |||
| CARLA_VESTIGE_HEADER = true | |||
| # Enable experimental plugins, don't complain if the build fails when using this! | |||
| EXPERIMENTAL_PLUGINS = false | |||
| @@ -57,7 +54,6 @@ endif | |||
| # Force some features on MacOS and Windows | |||
| ifeq ($(MACOS_OR_WIN32),true) | |||
| CARLA_VESTIGE_HEADER = false | |||
| EXPERIMENTAL_PLUGINS = false | |||
| endif | |||
| @@ -323,10 +319,6 @@ ifeq ($(HAVE_X11),true) | |||
| BASE_FLAGS += -DHAVE_X11 | |||
| endif | |||
| ifeq ($(CARLA_VESTIGE_HEADER),true) | |||
| BASE_FLAGS += -DVESTIGE_HEADER | |||
| endif | |||
| # -------------------------------------------------------------- | |||
| # Set libs stuff (part 1) | |||
| @@ -402,30 +394,24 @@ endif | |||
| endif | |||
| ifeq ($(MACOS),true) | |||
| DGL_LIBS = -framework OpenGL -framework Cocoa | |||
| HYLIA_FLAGS = -DLINK_PLATFORM_MACOSX=1 | |||
| JACKBRIDGE_LIBS = -ldl -lpthread | |||
| JUCE_AUDIO_BASICS_LIBS = -framework Accelerate | |||
| JUCE_AUDIO_DEVICES_LIBS = -framework AppKit -framework AudioToolbox -framework CoreAudio -framework CoreMIDI | |||
| JUCE_AUDIO_FORMATS_LIBS = -framework AudioToolbox -framework CoreFoundation | |||
| JUCE_AUDIO_PROCESSORS_LIBS = -framework AudioToolbox -framework AudioUnit -framework CoreAudio -framework CoreAudioKit -framework Cocoa -framework Carbon | |||
| JUCE_CORE_LIBS = -framework AppKit | |||
| JUCE_EVENTS_LIBS = -framework AppKit | |||
| JUCE_GRAPHICS_LIBS = -framework Cocoa -framework QuartzCore | |||
| JUCE_GUI_BASICS_LIBS = -framework Cocoa | |||
| JUCE_GUI_EXTRA_LIBS = -framework Cocoa -framework IOKit | |||
| LILV_LIBS = -ldl -lm | |||
| DGL_LIBS = -framework OpenGL -framework Cocoa | |||
| HYLIA_FLAGS = -DLINK_PLATFORM_MACOSX=1 | |||
| JACKBRIDGE_LIBS = -ldl -lpthread | |||
| JUCE_AUDIO_BASICS_LIBS = -framework Accelerate | |||
| JUCE_CORE_LIBS = -framework AppKit | |||
| LILV_LIBS = -ldl -lm | |||
| RTAUDIO_FLAGS += -D__MACOSX_CORE__ | |||
| RTMIDI_FLAGS += -D__MACOSX_CORE__ | |||
| endif | |||
| ifeq ($(WIN32),true) | |||
| DGL_LIBS = -lopengl32 -lgdi32 | |||
| HYLIA_FLAGS = -DLINK_PLATFORM_WINDOWS=1 | |||
| JACKBRIDGE_LIBS = -lpthread | |||
| JUCE_AUDIO_DEVICES_LIBS = -lwinmm -lole32 | |||
| JUCE_CORE_LIBS = -luuid -lwsock32 -lwininet -lversion -lole32 -lws2_32 -loleaut32 -limm32 -lcomdlg32 -lshlwapi -lrpcrt4 -lwinmm | |||
| JUCE_GRAPHICS_LIBS = -lgdi32 | |||
| JUCE_GUI_BASICS_LIBS = -lgdi32 -limm32 -lcomdlg32 -lole32 | |||
| LILV_LIBS = -lm | |||
| DGL_LIBS = -lopengl32 -lgdi32 | |||
| HYLIA_FLAGS = -DLINK_PLATFORM_WINDOWS=1 | |||
| JACKBRIDGE_LIBS = -lpthread | |||
| JUCE_CORE_LIBS = -luuid -lwsock32 -lwininet -lversion -lole32 -lws2_32 -loleaut32 -limm32 -lcomdlg32 -lshlwapi -lrpcrt4 -lwinmm | |||
| LILV_LIBS = -lm | |||
| RTAUDIO_FLAGS += -D__WINDOWS_ASIO__ -D__WINDOWS_DS__ -D__WINDOWS_WASAPI__ | |||
| RTMIDI_FLAGS += -D__WINDOWS_MM__ | |||
| endif | |||
| # -------------------------------------------------------------- | |||
| @@ -54,16 +54,6 @@ CARLA_BACKEND_START_NAMESPACE | |||
| */ | |||
| static const uint MAX_DEFAULT_PLUGINS = 99; | |||
| /*! | |||
| * Maximum number of loadable plugins in rack mode. | |||
| */ | |||
| static const uint MAX_RACK_PLUGINS = 16; | |||
| /*! | |||
| * Maximum number of loadable plugins in patchbay mode. | |||
| */ | |||
| static const uint MAX_PATCHBAY_PLUGINS = 255; | |||
| /*! | |||
| * Maximum default number of parameters allowed. | |||
| * @see ENGINE_OPTION_MAX_PARAMETERS | |||
| @@ -481,37 +471,25 @@ typedef enum { | |||
| */ | |||
| PLUGIN_VST2 = 5, | |||
| /*! | |||
| * VST3 plugin. | |||
| * @note Windows and MacOS only | |||
| */ | |||
| PLUGIN_VST3 = 6, | |||
| /*! | |||
| * AU plugin. | |||
| * @note MacOS only | |||
| */ | |||
| PLUGIN_AU = 7, | |||
| /*! | |||
| * GIG file. | |||
| */ | |||
| PLUGIN_GIG = 8, | |||
| PLUGIN_GIG = 6, | |||
| /*! | |||
| * SF2 file (SoundFont). | |||
| */ | |||
| PLUGIN_SF2 = 9, | |||
| PLUGIN_SF2 = 7, | |||
| /*! | |||
| * SFZ file. | |||
| */ | |||
| PLUGIN_SFZ = 10, | |||
| PLUGIN_SFZ = 8, | |||
| /*! | |||
| * JACK application. | |||
| */ | |||
| PLUGIN_JACK = 11 | |||
| PLUGIN_JACK = 9 | |||
| } PluginType; | |||
| @@ -984,7 +962,7 @@ typedef enum { | |||
| /*! | |||
| * Set the engine processing mode. | |||
| * Default is ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS on Linux and ENGINE_PROCESS_MODE_PATCHBAY for all other OSes. | |||
| * Default is ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS on Linux and ENGINE_PROCESS_MODE_CONTINUOUS_RACK for all other OSes. | |||
| * @see EngineProcessMode | |||
| */ | |||
| ENGINE_OPTION_PROCESS_MODE = 1, | |||
| @@ -1153,15 +1131,10 @@ typedef enum { | |||
| */ | |||
| ENGINE_PROCESS_MODE_CONTINUOUS_RACK = 2, | |||
| /*! | |||
| * Single client, 'patchbay' mode. | |||
| */ | |||
| ENGINE_PROCESS_MODE_PATCHBAY = 3, | |||
| /*! | |||
| * Special mode, used in plugin-bridges only. | |||
| */ | |||
| ENGINE_PROCESS_MODE_BRIDGE = 4 | |||
| ENGINE_PROCESS_MODE_BRIDGE = 3 | |||
| } EngineProcessMode; | |||
| @@ -55,25 +55,20 @@ enum EngineType { | |||
| */ | |||
| kEngineTypeJack = 1, | |||
| /*! | |||
| * Juce engine type, used to provide Native Audio and MIDI support. | |||
| */ | |||
| kEngineTypeJuce = 2, | |||
| /*! | |||
| * RtAudio engine type, used to provide Native Audio and MIDI support. | |||
| */ | |||
| kEngineTypeRtAudio = 3, | |||
| kEngineTypeRtAudio = 2, | |||
| /*! | |||
| * Plugin engine type, used to export the engine as a plugin. | |||
| */ | |||
| kEngineTypePlugin = 4, | |||
| kEngineTypePlugin = 3, | |||
| /*! | |||
| * Bridge engine type, used in BridgePlugin class. | |||
| */ | |||
| kEngineTypeBridge = 5 | |||
| kEngineTypeBridge = 4 | |||
| }; | |||
| /*! | |||
| @@ -243,7 +238,6 @@ struct CARLA_API EngineOptions { | |||
| const char* pathDSSI; | |||
| const char* pathLV2; | |||
| const char* pathVST2; | |||
| const char* pathVST3; | |||
| const char* pathGIG; | |||
| const char* pathSF2; | |||
| const char* pathSFZ; | |||
| @@ -986,7 +980,7 @@ public: | |||
| /*! | |||
| * Force the engine to resend all patchbay clients, ports and connections again. | |||
| */ | |||
| virtual bool patchbayRefresh(const bool external); | |||
| virtual bool patchbayRefresh(); | |||
| #endif | |||
| // ------------------------------------------------------------------- | |||
| @@ -1189,21 +1183,12 @@ public: | |||
| // Bridge | |||
| static CarlaEngine* newBridge(const char* const audioPoolBaseName, const char* const rtClientBaseName, const char* const nonRtClientBaseName, const char* const nonRtServerBaseName); | |||
| #else | |||
| # if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
| // Juce | |||
| static CarlaEngine* newJuce(const AudioApi api); | |||
| static uint getJuceApiCount(); | |||
| static const char* getJuceApiName(const uint index); | |||
| static const char* const* getJuceApiDeviceNames(const uint index); | |||
| static const EngineDriverDeviceInfo* getJuceDeviceInfo(const uint index, const char* const deviceName); | |||
| # else | |||
| // RtAudio | |||
| static CarlaEngine* newRtAudio(const AudioApi api); | |||
| static uint getRtAudioApiCount(); | |||
| static const char* getRtAudioApiName(const uint index); | |||
| static const char* const* getRtAudioApiDeviceNames(const uint index); | |||
| static const EngineDriverDeviceInfo* getRtAudioDeviceInfo(const uint index, const char* const deviceName); | |||
| # endif | |||
| #endif | |||
| #ifndef BUILD_BRIDGE | |||
| @@ -418,10 +418,8 @@ CARLA_EXPORT bool carla_patchbay_disconnect(uint connectionId); | |||
| /*! | |||
| * Force the engine to resend all patchbay clients, ports and connections again. | |||
| * @param external Wherever to show external/hardware ports instead of internal ones. | |||
| * Only valid in patchbay engine mode, other modes will ignore this. | |||
| */ | |||
| CARLA_EXPORT bool carla_patchbay_refresh(bool external); | |||
| CARLA_EXPORT bool carla_patchbay_refresh(); | |||
| /*! | |||
| * Start playback of the engine transport. | |||
| @@ -900,10 +900,7 @@ public: | |||
| static CarlaPlugin* newDSSI(const Initializer& init); | |||
| static CarlaPlugin* newLV2(const Initializer& init); | |||
| static CarlaPlugin* newVST2(const Initializer& init); | |||
| static CarlaPlugin* newVST3(const Initializer& init); | |||
| static CarlaPlugin* newAU(const Initializer& init); | |||
| static CarlaPlugin* newJuce(const Initializer& init, const char* const format); | |||
| static CarlaPlugin* newFluidSynth(const Initializer& init, const bool use16Outs); | |||
| static CarlaPlugin* newLinuxSampler(const Initializer& init, const char* const format, const bool use16Outs); | |||
| @@ -32,13 +32,7 @@ | |||
| #endif | |||
| #include "AppConfig.h" | |||
| #include "juce_audio_formats/juce_audio_formats.h" | |||
| #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
| # include "juce_gui_basics/juce_gui_basics.h" | |||
| #else | |||
| # include "juce_events/juce_events.h" | |||
| #endif | |||
| #include "juce_core/juce_core.h" | |||
| namespace CB = CarlaBackend; | |||
| using CB::EngineOptions; | |||
| @@ -186,9 +180,6 @@ static void carla_engine_init_common() | |||
| if (const char* const pathVST2 = std::getenv("ENGINE_OPTION_PLUGIN_PATH_VST2")) | |||
| gStandalone.engine->setOption(CB::ENGINE_OPTION_PLUGIN_PATH, CB::PLUGIN_VST2, pathVST2); | |||
| if (const char* const pathVST3 = std::getenv("ENGINE_OPTION_PLUGIN_PATH_VST3")) | |||
| gStandalone.engine->setOption(CB::ENGINE_OPTION_PLUGIN_PATH, CB::PLUGIN_VST3, pathVST3); | |||
| if (const char* const pathGIG = std::getenv("ENGINE_OPTION_PLUGIN_PATH_GIG")) | |||
| gStandalone.engine->setOption(CB::ENGINE_OPTION_PLUGIN_PATH, CB::PLUGIN_GIG, pathGIG); | |||
| @@ -241,9 +232,6 @@ static void carla_engine_init_common() | |||
| if (gStandalone.engineOptions.pathVST2 != nullptr) | |||
| gStandalone.engine->setOption(CB::ENGINE_OPTION_PLUGIN_PATH, CB::PLUGIN_VST2, gStandalone.engineOptions.pathVST2); | |||
| if (gStandalone.engineOptions.pathVST3 != nullptr) | |||
| gStandalone.engine->setOption(CB::ENGINE_OPTION_PLUGIN_PATH, CB::PLUGIN_VST3, gStandalone.engineOptions.pathVST3); | |||
| if (gStandalone.engineOptions.pathGIG != nullptr) | |||
| gStandalone.engine->setOption(CB::ENGINE_OPTION_PLUGIN_PATH, CB::PLUGIN_GIG, gStandalone.engineOptions.pathGIG); | |||
| @@ -323,8 +311,6 @@ bool carla_engine_init(const char* driverName, const char* clientName) | |||
| #else | |||
| gStandalone.engine->setOption(CB::ENGINE_OPTION_PROCESS_MODE, static_cast<int>(gStandalone.engineOptions.processMode), nullptr); | |||
| gStandalone.engine->setOption(CB::ENGINE_OPTION_TRANSPORT_MODE, static_cast<int>(gStandalone.engineOptions.transportMode), gStandalone.engineOptions.transportExtra); | |||
| juce::initialiseJuce_GUI(); | |||
| #endif | |||
| carla_engine_init_common(); | |||
| @@ -343,9 +329,6 @@ bool carla_engine_init(const char* driverName, const char* clientName) | |||
| gStandalone.lastError = gStandalone.engine->getLastError(); | |||
| delete gStandalone.engine; | |||
| gStandalone.engine = nullptr; | |||
| #ifndef BUILD_BRIDGE | |||
| juce::shutdownJuce_GUI(); | |||
| #endif | |||
| return false; | |||
| } | |||
| } | |||
| @@ -427,7 +410,6 @@ bool carla_engine_close() | |||
| gStandalone.engine = nullptr; | |||
| #ifndef BUILD_BRIDGE | |||
| juce::shutdownJuce_GUI(); | |||
| gStandalone.logThread.stop(); | |||
| #endif | |||
| @@ -439,15 +421,6 @@ void carla_engine_idle() | |||
| CARLA_SAFE_ASSERT_RETURN(gStandalone.engine != nullptr,); | |||
| gStandalone.engine->idle(); | |||
| #if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)) | |||
| using juce::MessageManager; | |||
| const MessageManager* const msgMgr(MessageManager::getInstanceWithoutCreating()); | |||
| CARLA_SAFE_ASSERT_RETURN(msgMgr != nullptr,); | |||
| for (; msgMgr->dispatchNextMessageOnSystemQueue(true);) {} | |||
| #endif | |||
| } | |||
| bool carla_is_engine_running() | |||
| @@ -581,11 +554,6 @@ void carla_set_engine_option(EngineOption option, int value, const char* valueSt | |||
| delete[] gStandalone.engineOptions.pathVST2; | |||
| gStandalone.engineOptions.pathVST2 = carla_strdup_safe(valueStr); | |||
| break; | |||
| case CB::PLUGIN_VST3: | |||
| if (gStandalone.engineOptions.pathVST3 != nullptr) | |||
| delete[] gStandalone.engineOptions.pathVST3; | |||
| gStandalone.engineOptions.pathVST3 = carla_strdup_safe(valueStr); | |||
| break; | |||
| case CB::PLUGIN_GIG: | |||
| if (gStandalone.engineOptions.pathGIG != nullptr) | |||
| delete[] gStandalone.engineOptions.pathGIG; | |||
| @@ -761,12 +729,12 @@ bool carla_patchbay_disconnect(uint connectionId) | |||
| return false; | |||
| } | |||
| bool carla_patchbay_refresh(bool external) | |||
| bool carla_patchbay_refresh() | |||
| { | |||
| carla_debug("carla_patchbay_refresh(%s)", bool2str(external)); | |||
| carla_debug("carla_patchbay_refresh()"); | |||
| if (gStandalone.engine != nullptr) | |||
| return gStandalone.engine->patchbayRefresh(external); | |||
| return gStandalone.engine->patchbayRefresh(); | |||
| carla_stderr2("Engine is not running"); | |||
| gStandalone.lastError = "Engine is not running"; | |||
| @@ -2040,6 +2008,5 @@ const char* carla_get_host_osc_url_udp() | |||
| #include "CarlaPatchbayUtils.cpp" | |||
| #include "CarlaPipeUtils.cpp" | |||
| #include "CarlaStateUtils.cpp" | |||
| #include "CarlaJuceAudioProcessors.cpp" | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| @@ -25,15 +25,8 @@ | |||
| #include "CarlaThread.hpp" | |||
| #include "LinkedList.hpp" | |||
| #ifndef CARLA_UTILS_CACHED_PLUGINS_ONLY | |||
| # include "juce_audio_formats/juce_audio_formats.h" | |||
| # ifdef HAVE_X11 | |||
| # include <X11/Xlib.h> | |||
| # endif | |||
| #endif | |||
| #ifdef CARLA_OS_MAC | |||
| # include "juce_audio_processors/juce_audio_processors.h" | |||
| #if defined(HAVE_X11) && ! defined(CARLA_UTILS_CACHED_PLUGINS_ONLY) | |||
| # include <X11/Xlib.h> | |||
| #endif | |||
| #include "../native-plugins/_data.cpp" | |||
| @@ -42,10 +35,6 @@ namespace CB = CarlaBackend; | |||
| static const char* const gNullCharPtr = ""; | |||
| #ifdef CARLA_OS_MAC | |||
| static juce::StringArray gCachedAuPluginResults; | |||
| #endif | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| _CarlaCachedPluginInfo::_CarlaCachedPluginInfo() noexcept | |||
| @@ -66,7 +55,7 @@ _CarlaCachedPluginInfo::_CarlaCachedPluginInfo() noexcept | |||
| uint carla_get_cached_plugin_count(CB::PluginType ptype, const char* pluginPath) | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(ptype == CB::PLUGIN_INTERNAL || ptype == CB::PLUGIN_LV2 || ptype == CB::PLUGIN_AU, 0); | |||
| CARLA_SAFE_ASSERT_RETURN(ptype == CB::PLUGIN_INTERNAL || ptype == CB::PLUGIN_LV2, 0); | |||
| carla_debug("carla_get_cached_plugin_count(%i:%s)", ptype, CB::PluginType2Str(ptype)); | |||
| switch (ptype) | |||
| @@ -83,24 +72,6 @@ uint carla_get_cached_plugin_count(CB::PluginType ptype, const char* pluginPath) | |||
| return lv2World.getPluginCount(); | |||
| } | |||
| case CB::PLUGIN_AU: { | |||
| #ifdef CARLA_OS_MAC | |||
| static bool initiated = false; | |||
| if (! initiated) | |||
| { | |||
| using namespace juce; | |||
| initiated = true; | |||
| AudioUnitPluginFormat auFormat; | |||
| gCachedAuPluginResults = auFormat.searchPathsForPlugins(juce::FileSearchPath(), false, false); | |||
| } | |||
| return static_cast<uint>(gCachedAuPluginResults.size()); | |||
| #else | |||
| return 0; | |||
| #endif | |||
| } | |||
| default: | |||
| return 0; | |||
| } | |||
| @@ -431,56 +402,6 @@ const CarlaCachedPluginInfo* carla_get_cached_plugin_info(CB::PluginType ptype, | |||
| return &info; | |||
| } | |||
| case CB::PLUGIN_AU: { | |||
| #ifdef CARLA_OS_MAC | |||
| const int indexi(static_cast<int>(index)); | |||
| CARLA_SAFE_ASSERT_BREAK(indexi < gCachedAuPluginResults.size()); | |||
| using namespace juce; | |||
| String pluginId(gCachedAuPluginResults[indexi]); | |||
| OwnedArray<PluginDescription> results; | |||
| AudioUnitPluginFormat auFormat; | |||
| auFormat.findAllTypesForFile(results, pluginId); | |||
| CARLA_SAFE_ASSERT_BREAK(results.size() > 0); | |||
| CARLA_SAFE_ASSERT(results.size() == 1); | |||
| PluginDescription* const desc(results[0]); | |||
| CARLA_SAFE_ASSERT_BREAK(desc != nullptr); | |||
| info.category = CB::getPluginCategoryFromName(desc->category.toRawUTF8()); | |||
| info.hints = 0x0; | |||
| if (desc->isInstrument) | |||
| info.hints |= CB::PLUGIN_IS_SYNTH; | |||
| if (true) | |||
| info.hints |= CB::PLUGIN_HAS_CUSTOM_UI; | |||
| info.audioIns = static_cast<uint32_t>(desc->numInputChannels); | |||
| info.audioOuts = static_cast<uint32_t>(desc->numOutputChannels); | |||
| info.midiIns = desc->isInstrument ? 1 : 0; | |||
| info.midiOuts = 0; | |||
| info.parameterIns = 0; | |||
| info.parameterOuts = 0; | |||
| static CarlaString sname, slabel, smaker; | |||
| sname = desc->name.toRawUTF8(); | |||
| slabel = desc->fileOrIdentifier.toRawUTF8(); | |||
| smaker = desc->manufacturerName.toRawUTF8(); | |||
| info.name = sname; | |||
| info.label = slabel; | |||
| info.maker = smaker; | |||
| info.copyright = gNullCharPtr; | |||
| return &info; | |||
| #else | |||
| break; | |||
| #endif | |||
| } | |||
| default: | |||
| break; | |||
| } | |||
| @@ -515,34 +436,18 @@ const char* carla_get_complete_license_text() | |||
| "<p>This current Carla build is using the following features and 3rd-party code:</p>" | |||
| "<ul>" | |||
| #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) || ! defined(VESTIGE_HEADER) | |||
| # define LS_NOTE_NO "2" | |||
| #else | |||
| # define LS_NOTE_NO "1" | |||
| #endif | |||
| // Plugin formats | |||
| "<li>LADSPA plugin support</li>" | |||
| "<li>DSSI plugin support</li>" | |||
| "<li>LV2 plugin support</li>" | |||
| #ifdef VESTIGE_HEADER | |||
| "<li>VST2 plugin support using VeSTige header by Javier Serrano Polo</li>" | |||
| #else | |||
| "<li>VST2 plugin support using official VST SDK 2.4 [1]</li>" | |||
| #endif | |||
| #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
| "<li>VST3 plugin support using official VST SDK 3.6 [1]</li>" | |||
| #endif | |||
| #ifdef CARLA_OS_MAC | |||
| "<li>AU plugin support</li>" | |||
| #endif | |||
| // Sample kit libraries | |||
| #ifdef HAVE_FLUIDSYNTH | |||
| "<li>FluidSynth library for SF2 support</li>" | |||
| #endif | |||
| #ifdef HAVE_LINUXSAMPLER | |||
| "<li>LinuxSampler library for GIG and SFZ support [" LS_NOTE_NO "]</li>" | |||
| "<li>LinuxSampler library for GIG and SFZ support [1]</li>" | |||
| #endif | |||
| // misc libs | |||
| @@ -550,9 +455,7 @@ const char* carla_get_complete_license_text() | |||
| "<li>liblo library for OSC support</li>" | |||
| "<li>rtmempool library by Nedko Arnaudov" | |||
| "<li>serd, sord, sratom and lilv libraries for LV2 discovery</li>" | |||
| #if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)) | |||
| "<li>RtAudio and RtMidi libraries for extra Audio and MIDI support</li>" | |||
| #endif | |||
| // Internal plugins | |||
| #ifdef HAVE_EXPERIMENTAL_PLUGINS | |||
| @@ -569,13 +472,9 @@ const char* carla_get_complete_license_text() | |||
| "</ul>" | |||
| "<p>" | |||
| #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) || ! defined(VESTIGE_HEADER) | |||
| // Required by VST SDK | |||
| " [1] Trademark of Steinberg Media Technologies GmbH.<br/>" | |||
| #endif | |||
| #ifdef HAVE_LINUXSAMPLER | |||
| // LinuxSampler GPL exception | |||
| " [" LS_NOTE_NO "] Using LinuxSampler code in commercial hardware or software products is not allowed without prior written authorization by the authors." | |||
| " [1] Using LinuxSampler code in commercial hardware or software products is not allowed without prior written authorization by the authors." | |||
| #endif | |||
| "</p>" | |||
| ; | |||
| @@ -584,23 +483,6 @@ const char* carla_get_complete_license_text() | |||
| return retText; | |||
| } | |||
| const char* carla_get_juce_version() | |||
| { | |||
| carla_debug("carla_get_juce_version()"); | |||
| static CarlaString retVersion; | |||
| if (retVersion.isEmpty()) | |||
| { | |||
| if (const char* const version = juce::SystemStats::getJUCEVersion().toRawUTF8()) | |||
| retVersion = version+6; | |||
| else | |||
| retVersion = "4.0"; | |||
| } | |||
| return retVersion; | |||
| } | |||
| const char* carla_get_supported_file_extensions() | |||
| { | |||
| carla_debug("carla_get_supported_file_extensions()"); | |||
| @@ -628,6 +510,7 @@ const char* carla_get_supported_file_extensions() | |||
| #endif | |||
| ; | |||
| #if 0 | |||
| // Audio files | |||
| { | |||
| using namespace juce; | |||
| @@ -647,6 +530,7 @@ const char* carla_get_supported_file_extensions() | |||
| retText += juceFormats.toRawUTF8(); | |||
| } | |||
| #endif | |||
| } | |||
| return retText; | |||
| @@ -129,11 +129,6 @@ typedef struct _CarlaCachedPluginInfo { | |||
| */ | |||
| CARLA_EXPORT const char* carla_get_complete_license_text(); | |||
| /*! | |||
| * Get the juce version used in the current Carla build. | |||
| */ | |||
| CARLA_EXPORT const char* carla_get_juce_version(); | |||
| /*! | |||
| * Get all the supported file extensions in carla_load_file(). | |||
| * Returned string uses this syntax: | |||
| @@ -27,9 +27,7 @@ STANDALONE_LIBS += $(MODULEDIR)/carla_plugin.a | |||
| STANDALONE_LIBS += $(MODULEDIR)/jackbridge.a | |||
| STANDALONE_LIBS += $(MODULEDIR)/juce_audio_basics.a | |||
| STANDALONE_LIBS += $(MODULEDIR)/juce_audio_formats.a | |||
| STANDALONE_LIBS += $(MODULEDIR)/juce_core.a | |||
| STANDALONE_LIBS += $(MODULEDIR)/juce_events.a | |||
| STANDALONE_LIBS += $(MODULEDIR)/lilv.a | |||
| STANDALONE_LIBS += $(MODULEDIR)/native-plugins.a | |||
| STANDALONE_LIBS += $(MODULEDIR)/rtmempool.a | |||
| @@ -42,58 +40,24 @@ ifeq ($(HAVE_HYLIA),true) | |||
| STANDALONE_LIBS += $(MODULEDIR)/hylia.a | |||
| endif | |||
| ifeq ($(MACOS_OR_WIN32),true) | |||
| STANDALONE_LIBS += $(MODULEDIR)/juce_audio_devices.a | |||
| STANDALONE_LIBS += $(MODULEDIR)/juce_audio_processors.a | |||
| STANDALONE_LIBS += $(MODULEDIR)/juce_data_structures.a | |||
| STANDALONE_LIBS += $(MODULEDIR)/juce_graphics.a | |||
| STANDALONE_LIBS += $(MODULEDIR)/juce_gui_basics.a | |||
| ifeq ($(MACOS),true) | |||
| STANDALONE_LIBS += $(MODULEDIR)/juce_gui_extra.a | |||
| endif | |||
| else | |||
| STANDALONE_LIBS += $(MODULEDIR)/rtaudio.a | |||
| STANDALONE_LIBS += $(MODULEDIR)/rtmidi.a | |||
| endif | |||
| UTILS_LIBS = $(MODULEDIR)/juce_audio_basics.a | |||
| UTILS_LIBS += $(MODULEDIR)/juce_audio_formats.a | |||
| UTILS_LIBS += $(MODULEDIR)/juce_core.a | |||
| UTILS_LIBS += $(MODULEDIR)/juce_events.a | |||
| UTILS_LIBS += $(MODULEDIR)/lilv.a | |||
| ifeq ($(MACOS),true) | |||
| UTILS_LIBS += $(MODULEDIR)/juce_audio_processors.a | |||
| UTILS_LIBS += $(MODULEDIR)/juce_data_structures.a | |||
| UTILS_LIBS += $(MODULEDIR)/juce_graphics.a | |||
| UTILS_LIBS += $(MODULEDIR)/juce_gui_basics.a | |||
| UTILS_LIBS += $(MODULEDIR)/juce_gui_extra.a | |||
| endif | |||
| # ---------------------------------------------------------------------------------------------------------------------------- | |||
| STANDALONE_LINK_FLAGS = $(JACKBRIDGE_LIBS) | |||
| STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS) | |||
| STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS) | |||
| STANDALONE_LINK_FLAGS += $(JUCE_CORE_LIBS) | |||
| STANDALONE_LINK_FLAGS += $(LILV_LIBS) | |||
| STANDALONE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS) | |||
| STANDALONE_LINK_FLAGS += $(RTMEMPOOL_LIBS) | |||
| ifeq ($(MACOS_OR_WIN32),true) | |||
| STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_DEVICES_LIBS) | |||
| STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS) | |||
| STANDALONE_LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS) | |||
| STANDALONE_LINK_FLAGS += $(JUCE_EVENTS_LIBS) | |||
| STANDALONE_LINK_FLAGS += $(JUCE_GRAPHICS_LIBS) | |||
| STANDALONE_LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS) | |||
| ifeq ($(MACOS),true) | |||
| STANDALONE_LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS) | |||
| endif | |||
| else | |||
| STANDALONE_LINK_FLAGS += $(RTAUDIO_LIBS) | |||
| STANDALONE_LINK_FLAGS += $(RTMIDI_LIBS) | |||
| endif | |||
| ifeq ($(HAVE_LIBLO),true) | |||
| STANDALONE_LINK_FLAGS += $(LIBLO_LIBS) | |||
| @@ -116,7 +80,6 @@ STANDALONE_LINK_FLAGS += $(X11_LIBS) | |||
| endif | |||
| UTILS_LINK_FLAGS = $(JUCE_AUDIO_BASICS_LIBS) | |||
| UTILS_LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS) | |||
| UTILS_LINK_FLAGS += $(JUCE_CORE_LIBS) | |||
| UTILS_LINK_FLAGS += $(LILV_LIBS) | |||
| @@ -124,15 +87,6 @@ ifeq ($(HAVE_X11),true) | |||
| UTILS_LINK_FLAGS += $(X11_LIBS) | |||
| endif | |||
| ifeq ($(MACOS),true) | |||
| UTILS_LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS) | |||
| UTILS_LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS) | |||
| UTILS_LINK_FLAGS += $(JUCE_EVENTS_LIBS) | |||
| UTILS_LINK_FLAGS += $(JUCE_GRAPHICS_LIBS) | |||
| UTILS_LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS) | |||
| UTILS_LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS) | |||
| endif | |||
| ifneq ($(HAIKU),true) | |||
| UTILS_LINK_FLAGS += -lpthread | |||
| endif | |||
| @@ -595,14 +595,6 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||
| plugin = CarlaPlugin::newVST2(initializer); | |||
| break; | |||
| case PLUGIN_VST3: | |||
| plugin = CarlaPlugin::newVST3(initializer); | |||
| break; | |||
| case PLUGIN_AU: | |||
| plugin = CarlaPlugin::newAU(initializer); | |||
| break; | |||
| case PLUGIN_GIG: | |||
| use16Outs = (extra != nullptr && std::strcmp((const char*)extra, "true") == 0); | |||
| plugin = CarlaPlugin::newFileGIG(initializer, use16Outs); | |||
| @@ -644,19 +636,6 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||
| canRun = false; | |||
| } | |||
| } | |||
| else if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| { | |||
| /**/ if (plugin->getMidiInCount() > 1 || plugin->getMidiOutCount() > 1) | |||
| { | |||
| setLastError("Carla's patchbay mode cannot work with plugins that have multiple MIDI ports, sorry!"); | |||
| canRun = false; | |||
| } | |||
| else if (plugin->getCVInCount() > 0 || plugin->getCVInCount() > 0) | |||
| { | |||
| setLastError("CV ports in patchbay mode is still TODO"); | |||
| canRun = false; | |||
| } | |||
| } | |||
| if (! canRun) | |||
| { | |||
| @@ -683,9 +662,6 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||
| const ScopedThreadStopper sts(this); | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| pData->graph.replacePlugin(oldPlugin, plugin); | |||
| const bool wasActive = oldPlugin->getInternalParameterValue(PARAMETER_ACTIVE) >= 0.5f; | |||
| const float oldDryWet = oldPlugin->getInternalParameterValue(PARAMETER_DRYWET); | |||
| const float oldVolume = oldPlugin->getInternalParameterValue(PARAMETER_VOLUME); | |||
| @@ -711,11 +687,6 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||
| ++pData->curPluginCount; | |||
| callback(ENGINE_CALLBACK_PLUGIN_ADDED, id, 0, 0, 0.0f, plugin->getName()); | |||
| #ifndef BUILD_BRIDGE | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| pData->graph.addPlugin(plugin); | |||
| #endif | |||
| } | |||
| return true; | |||
| @@ -745,9 +716,6 @@ bool CarlaEngine::removePlugin(const uint id) | |||
| const ScopedThreadStopper sts(this); | |||
| #ifndef BUILD_BRIDGE | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| pData->graph.removePlugin(plugin); | |||
| const bool lockWait(isRunning() /*&& pData->options.processMode != ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS*/); | |||
| const ScopedActionLock sal(this, kEnginePostActionRemovePlugin, id, 0, lockWait); | |||
| @@ -792,17 +760,12 @@ bool CarlaEngine::removeAllPlugins() | |||
| const uint curPluginCount(pData->curPluginCount); | |||
| #ifndef BUILD_BRIDGE | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| pData->graph.removeAllPlugins(); | |||
| # ifdef HAVE_LIBLO | |||
| #if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||
| if (isOscControlRegistered()) | |||
| { | |||
| for (uint i=0; i < curPluginCount; ++i) | |||
| oscSend_control_remove_plugin(curPluginCount-i-1); | |||
| } | |||
| # endif | |||
| #endif | |||
| const bool lockWait(isRunning()); | |||
| @@ -851,9 +814,6 @@ const char* CarlaEngine::renamePlugin(const uint id, const char* const newName) | |||
| plugin->setName(uniqueName); | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| pData->graph.renamePlugin(plugin, uniqueName); | |||
| delete[] uniqueName; | |||
| return plugin->getName(); | |||
| } | |||
| @@ -939,9 +899,6 @@ bool CarlaEngine::switchPlugins(const uint idA, const uint idB) noexcept | |||
| const ScopedThreadStopper sts(this); | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| pData->graph.replacePlugin(pluginA, pluginB); | |||
| const bool lockWait(isRunning() /*&& pData->options.processMode != ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS*/); | |||
| const ScopedActionLock sal(this, kEnginePostActionSwitchPlugins, idA, idB, lockWait); | |||
| @@ -1161,11 +1118,6 @@ bool CarlaEngine::loadFile(const char* const filename) | |||
| return addPlugin(getBinaryTypeFromFile(filename), PLUGIN_VST2, filename, nullptr, nullptr, 0, nullptr, 0x0); | |||
| #endif | |||
| #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
| if (extension == "vst3") | |||
| return addPlugin(getBinaryTypeFromFile(filename), PLUGIN_VST3, filename, nullptr, nullptr, 0, nullptr, 0x0); | |||
| #endif | |||
| // ------------------------------------------------------------------- | |||
| setLastError("Unknown file extension"); | |||
| @@ -1531,14 +1483,6 @@ void CarlaEngine::setOption(const EngineOption option, const int value, const ch | |||
| else | |||
| pData->options.pathVST2 = nullptr; | |||
| break; | |||
| case PLUGIN_VST3: | |||
| if (pData->options.pathVST3 != nullptr) | |||
| delete[] pData->options.pathVST3; | |||
| if (valueStr != nullptr) | |||
| pData->options.pathVST3 = carla_strdup_safe(valueStr); | |||
| else | |||
| pData->options.pathVST3 = nullptr; | |||
| break; | |||
| case PLUGIN_GIG: | |||
| if (pData->options.pathGIG != nullptr) | |||
| delete[] pData->options.pathGIG; | |||
| @@ -1698,11 +1642,8 @@ void CarlaEngine::bufferSizeChanged(const uint32_t newBufferSize) | |||
| carla_debug("CarlaEngine::bufferSizeChanged(%i)", newBufferSize); | |||
| #ifndef BUILD_BRIDGE | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || | |||
| pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| { | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | |||
| pData->graph.setBufferSize(newBufferSize); | |||
| } | |||
| #endif | |||
| pData->time.updateAudioValues(newBufferSize, pData->sampleRate); | |||
| @@ -1723,11 +1664,8 @@ void CarlaEngine::sampleRateChanged(const double newSampleRate) | |||
| carla_debug("CarlaEngine::sampleRateChanged(%g)", newSampleRate); | |||
| #ifndef BUILD_BRIDGE | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || | |||
| pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| { | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | |||
| pData->graph.setSampleRate(newSampleRate); | |||
| } | |||
| #endif | |||
| pData->time.updateAudioValues(pData->bufferSize, newSampleRate); | |||
| @@ -1748,11 +1686,8 @@ void CarlaEngine::offlineModeChanged(const bool isOfflineNow) | |||
| carla_debug("CarlaEngine::offlineModeChanged(%s)", bool2str(isOfflineNow)); | |||
| #ifndef BUILD_BRIDGE | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || | |||
| pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| { | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | |||
| pData->graph.setOffline(isOfflineNow); | |||
| } | |||
| #endif | |||
| for (uint i=0; i < pData->curPluginCount; ++i) | |||
| @@ -1821,7 +1756,6 @@ void CarlaEngine::saveProjectInternal(juce::MemoryOutputStream& outStream) const | |||
| outSettings << " <DSSI_PATH>" << xmlSafeString(options.pathDSSI, true) << "</DSSI_PATH>\n"; | |||
| outSettings << " <LV2_PATH>" << xmlSafeString(options.pathLV2, true) << "</LV2_PATH>\n"; | |||
| outSettings << " <VST2_PATH>" << xmlSafeString(options.pathVST2, true) << "</VST2_PATH>\n"; | |||
| outSettings << " <VST3_PATH>" << xmlSafeString(options.pathVST3, true) << "</VST3_PATH>\n"; | |||
| outSettings << " <GIG_PATH>" << xmlSafeString(options.pathGIG, true) << "</GIG_PATH>\n"; | |||
| outSettings << " <SF2_PATH>" << xmlSafeString(options.pathSF2, true) << "</SF2_PATH>\n"; | |||
| outSettings << " <SFZ_PATH>" << xmlSafeString(options.pathSFZ, true) << "</SFZ_PATH>\n"; | |||
| @@ -1866,34 +1800,6 @@ void CarlaEngine::saveProjectInternal(juce::MemoryOutputStream& outStream) const | |||
| plugin->setCustomData(CUSTOM_DATA_TYPE_STRING, "__CarlaPingOnOff__", "true", false); | |||
| } | |||
| // save internal connections | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| { | |||
| if (const char* const* const patchbayConns = getPatchbayConnections(false)) | |||
| { | |||
| MemoryOutputStream outPatchbay(2048); | |||
| outPatchbay << "\n <Patchbay>\n"; | |||
| for (int i=0; patchbayConns[i] != nullptr && patchbayConns[i+1] != nullptr; ++i, ++i ) | |||
| { | |||
| const char* const connSource(patchbayConns[i]); | |||
| const char* const connTarget(patchbayConns[i+1]); | |||
| CARLA_SAFE_ASSERT_CONTINUE(connSource != nullptr && connSource[0] != '\0'); | |||
| CARLA_SAFE_ASSERT_CONTINUE(connTarget != nullptr && connTarget[0] != '\0'); | |||
| outPatchbay << " <Connection>\n"; | |||
| outPatchbay << " <Source>" << xmlSafeString(connSource, true) << "</Source>\n"; | |||
| outPatchbay << " <Target>" << xmlSafeString(connTarget, true) << "</Target>\n"; | |||
| outPatchbay << " </Connection>\n"; | |||
| } | |||
| outPatchbay << " </Patchbay>\n"; | |||
| outStream << outPatchbay; | |||
| } | |||
| } | |||
| // if we're running inside some session-manager (and using JACK), let them handle the connections | |||
| bool saveExternalConnections; | |||
| @@ -1961,7 +1867,7 @@ static String findBinaryInCustomPath(const char* const searchPath, const char* c | |||
| int searchFlags = File::findFiles|File::ignoreHiddenFiles; | |||
| #ifdef CARLA_OS_MAC | |||
| if (filename.endsWithIgnoreCase(".vst") || filename.endsWithIgnoreCase(".vst3")) | |||
| if (filename.endsWithIgnoreCase(".vst")) | |||
| searchFlags |= File::findDirectories; | |||
| #endif | |||
| @@ -2108,12 +2014,6 @@ bool CarlaEngine::loadProjectInternal(juce::XmlDocument& xmlDoc) | |||
| value = PLUGIN_VST2; | |||
| valueStr = text.toRawUTF8(); | |||
| } | |||
| else if (tag.equalsIgnoreCase("VST3_PATH")) | |||
| { | |||
| option = ENGINE_OPTION_PLUGIN_PATH; | |||
| value = PLUGIN_VST3; | |||
| valueStr = text.toRawUTF8(); | |||
| } | |||
| else if (tag.equalsIgnoreCase("GIG_PATH")) | |||
| { | |||
| option = ENGINE_OPTION_PLUGIN_PATH; | |||
| @@ -2177,7 +2077,6 @@ bool CarlaEngine::loadProjectInternal(juce::XmlDocument& xmlDoc) | |||
| case PLUGIN_LADSPA: | |||
| case PLUGIN_DSSI: | |||
| case PLUGIN_VST2: | |||
| case PLUGIN_VST3: | |||
| case PLUGIN_SFZ: | |||
| if (stateSave.binary != nullptr && stateSave.binary[0] != '\0' && | |||
| ! (File::isAbsolutePath(stateSave.binary) && File(stateSave.binary).exists())) | |||
| @@ -2189,7 +2088,6 @@ bool CarlaEngine::loadProjectInternal(juce::XmlDocument& xmlDoc) | |||
| case PLUGIN_LADSPA: searchPath = pData->options.pathLADSPA; break; | |||
| case PLUGIN_DSSI: searchPath = pData->options.pathDSSI; break; | |||
| case PLUGIN_VST2: searchPath = pData->options.pathVST2; break; | |||
| case PLUGIN_VST3: searchPath = pData->options.pathVST3; break; | |||
| case PLUGIN_GIG: searchPath = pData->options.pathGIG; break; | |||
| case PLUGIN_SF2: searchPath = pData->options.pathSF2; break; | |||
| case PLUGIN_SFZ: searchPath = pData->options.pathSFZ; break; | |||
| @@ -2210,7 +2108,6 @@ bool CarlaEngine::loadProjectInternal(juce::XmlDocument& xmlDoc) | |||
| case PLUGIN_LADSPA: searchPath = std::getenv("LADSPA_PATH"); break; | |||
| case PLUGIN_DSSI: searchPath = std::getenv("DSSI_PATH"); break; | |||
| case PLUGIN_VST2: searchPath = std::getenv("VST_PATH"); break; | |||
| case PLUGIN_VST3: searchPath = std::getenv("VST3_PATH"); break; | |||
| case PLUGIN_GIG: searchPath = std::getenv("GIG_PATH"); break; | |||
| case PLUGIN_SF2: searchPath = std::getenv("SF2_PATH"); break; | |||
| case PLUGIN_SFZ: searchPath = std::getenv("SFZ_PATH"); break; | |||
| @@ -2272,11 +2169,6 @@ bool CarlaEngine::loadProjectInternal(juce::XmlDocument& xmlDoc) | |||
| plugin->setEnabled(true); | |||
| callback(ENGINE_CALLBACK_PLUGIN_ADDED, pluginId, 0, 0, 0.0f, plugin->getName()); | |||
| #ifndef BUILD_BRIDGE | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| pData->graph.addPlugin(plugin); | |||
| #endif | |||
| } | |||
| else | |||
| { | |||
| @@ -2308,53 +2200,6 @@ bool CarlaEngine::loadProjectInternal(juce::XmlDocument& xmlDoc) | |||
| if (pData->aboutToClose) | |||
| return true; | |||
| // handle connections (internal) | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| { | |||
| const bool isUsingExternal(pData->graph.isUsingExternal()); | |||
| for (XmlElement* elem = xmlElement->getFirstChildElement(); elem != nullptr; elem = elem->getNextElement()) | |||
| { | |||
| const String& tagName(elem->getTagName()); | |||
| if (! tagName.equalsIgnoreCase("patchbay")) | |||
| continue; | |||
| CarlaString sourcePort, targetPort; | |||
| for (XmlElement* patchElem = elem->getFirstChildElement(); patchElem != nullptr; patchElem = patchElem->getNextElement()) | |||
| { | |||
| const String& patchTag(patchElem->getTagName()); | |||
| sourcePort.clear(); | |||
| targetPort.clear(); | |||
| if (! patchTag.equalsIgnoreCase("connection")) | |||
| continue; | |||
| for (XmlElement* connElem = patchElem->getFirstChildElement(); connElem != nullptr; connElem = connElem->getNextElement()) | |||
| { | |||
| const String& tag(connElem->getTagName()); | |||
| const String text(connElem->getAllSubText().trim()); | |||
| /**/ if (tag.equalsIgnoreCase("source")) | |||
| sourcePort = xmlSafeString(text, false).toRawUTF8(); | |||
| else if (tag.equalsIgnoreCase("target")) | |||
| targetPort = xmlSafeString(text, false).toRawUTF8(); | |||
| } | |||
| if (sourcePort.isNotEmpty() && targetPort.isNotEmpty()) | |||
| restorePatchbayConnection(false, sourcePort, targetPort, !isUsingExternal); | |||
| } | |||
| break; | |||
| } | |||
| callback(ENGINE_CALLBACK_IDLE, 0, 0, 0, 0.0f, nullptr); | |||
| if (pData->aboutToClose) | |||
| return true; | |||
| } | |||
| // if we're running inside some session-manager (and using JACK), let them handle the external connections | |||
| bool loadExternalConnections; | |||
| @@ -187,7 +187,7 @@ EngineOptions::EngineOptions() noexcept | |||
| : processMode(ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS), | |||
| transportMode(ENGINE_TRANSPORT_MODE_JACK), | |||
| #else | |||
| : processMode(ENGINE_PROCESS_MODE_PATCHBAY), | |||
| : processMode(ENGINE_PROCESS_MODE_CONTINUOUS_RACK), | |||
| transportMode(ENGINE_TRANSPORT_MODE_INTERNAL), | |||
| #endif | |||
| transportExtra(nullptr), | |||
| @@ -209,7 +209,6 @@ EngineOptions::EngineOptions() noexcept | |||
| pathDSSI(nullptr), | |||
| pathLV2(nullptr), | |||
| pathVST2(nullptr), | |||
| pathVST3(nullptr), | |||
| pathGIG(nullptr), | |||
| pathSF2(nullptr), | |||
| pathSFZ(nullptr), | |||
| @@ -250,12 +249,6 @@ EngineOptions::~EngineOptions() noexcept | |||
| pathVST2 = nullptr; | |||
| } | |||
| if (pathVST3 != nullptr) | |||
| { | |||
| delete[] pathVST3; | |||
| pathVST3 = nullptr; | |||
| } | |||
| if (pathGIG != nullptr) | |||
| { | |||
| delete[] pathGIG; | |||
| @@ -32,18 +32,19 @@ | |||
| #endif | |||
| using juce::AudioBuffer; | |||
| using juce::AudioPluginInstance; | |||
| using juce::AudioProcessor; | |||
| using juce::AudioProcessorEditor; | |||
| using juce::FloatVectorOperations; | |||
| using juce::MemoryBlock; | |||
| using juce::MessageManagerLock; | |||
| using juce::PluginDescription; | |||
| using juce::String; | |||
| using juce::StringArray; | |||
| using juce::jmin; | |||
| using juce::jmax; | |||
| #if 0 | |||
| using juce::AudioPluginInstance; | |||
| using juce::AudioProcessor; | |||
| using juce::AudioProcessorEditor; | |||
| #endif | |||
| CARLA_BACKEND_START_NAMESPACE | |||
| // ----------------------------------------------------------------------- | |||
| @@ -1005,6 +1006,7 @@ void RackGraph::processHelper(CarlaEngine::ProtectedData* const data, const floa | |||
| } | |||
| } | |||
| #if 0 | |||
| // ----------------------------------------------------------------------- | |||
| // Patchbay Graph stuff | |||
| @@ -1943,6 +1945,7 @@ void PatchbayGraph::process(CarlaEngine::ProtectedData* const data, const float* | |||
| midiBuffer.clear(); | |||
| } | |||
| } | |||
| #endif | |||
| // ----------------------------------------------------------------------- | |||
| // InternalGraph | |||
| @@ -1973,7 +1976,9 @@ void EngineInternalGraph::create(const uint32_t inputs, const uint32_t outputs) | |||
| else | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fPatchbay == nullptr,); | |||
| #if 0 | |||
| fPatchbay = new PatchbayGraph(kEngine, inputs, outputs); | |||
| #endif | |||
| } | |||
| fIsReady = true; | |||
| @@ -1996,11 +2001,13 @@ void EngineInternalGraph::destroy() noexcept | |||
| else | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,); | |||
| #if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)) | |||
| #if 0 | |||
| # if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)) | |||
| const MessageManagerLock mml; | |||
| #endif | |||
| # endif | |||
| delete fPatchbay; | |||
| fPatchbay = nullptr; | |||
| #endif | |||
| } | |||
| fIsReady = false; | |||
| @@ -2018,7 +2025,9 @@ void EngineInternalGraph::setBufferSize(const uint32_t bufferSize) | |||
| else | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,); | |||
| #if 0 | |||
| fPatchbay->setBufferSize(bufferSize); | |||
| #endif | |||
| } | |||
| } | |||
| @@ -2033,7 +2042,9 @@ void EngineInternalGraph::setSampleRate(const double sampleRate) | |||
| else | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,); | |||
| #if 0 | |||
| fPatchbay->setSampleRate(sampleRate); | |||
| #endif | |||
| } | |||
| } | |||
| @@ -2049,7 +2060,9 @@ void EngineInternalGraph::setOffline(const bool offline) | |||
| else | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,); | |||
| #if 0 | |||
| fPatchbay->setOffline(offline); | |||
| #endif | |||
| } | |||
| } | |||
| @@ -2082,7 +2095,9 @@ void EngineInternalGraph::process(CarlaEngine::ProtectedData* const data, const | |||
| else | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,); | |||
| #if 0 | |||
| fPatchbay->process(data, inBuf, outBuf, static_cast<int>(frames)); | |||
| #endif | |||
| } | |||
| } | |||
| @@ -2100,46 +2115,60 @@ void EngineInternalGraph::processRack(CarlaEngine::ProtectedData* const data, co | |||
| void EngineInternalGraph::addPlugin(CarlaPlugin* const plugin) | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,); | |||
| #if 0 | |||
| fPatchbay->addPlugin(plugin); | |||
| #endif | |||
| } | |||
| void EngineInternalGraph::replacePlugin(CarlaPlugin* const oldPlugin, CarlaPlugin* const newPlugin) | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,); | |||
| #if 0 | |||
| fPatchbay->replacePlugin(oldPlugin, newPlugin); | |||
| #endif | |||
| } | |||
| void EngineInternalGraph::renamePlugin(CarlaPlugin* const plugin, const char* const newName) | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,); | |||
| #if 0 | |||
| fPatchbay->renamePlugin(plugin, newName); | |||
| #endif | |||
| } | |||
| void EngineInternalGraph::removePlugin(CarlaPlugin* const plugin) | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,); | |||
| #if 0 | |||
| fPatchbay->removePlugin(plugin); | |||
| #endif | |||
| } | |||
| void EngineInternalGraph::removeAllPlugins() | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,); | |||
| #if 0 | |||
| fPatchbay->removeAllPlugins(); | |||
| #endif | |||
| } | |||
| bool EngineInternalGraph::isUsingExternal() const noexcept | |||
| { | |||
| if (fIsRack) | |||
| // if (fIsRack) | |||
| return true; | |||
| #if 0 | |||
| CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr, false); | |||
| return fPatchbay->usingExternal; | |||
| #endif | |||
| } | |||
| void EngineInternalGraph::setUsingExternal(const bool usingExternal) noexcept | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,); | |||
| #if 0 | |||
| fPatchbay->usingExternal = usingExternal; | |||
| #endif | |||
| } | |||
| // ----------------------------------------------------------------------- | |||
| @@ -2147,7 +2176,7 @@ void EngineInternalGraph::setUsingExternal(const bool usingExternal) noexcept | |||
| bool CarlaEngine::patchbayConnect(const uint groupA, const uint portA, const uint groupB, const uint portB) | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY, false); | |||
| CARLA_SAFE_ASSERT_RETURN(pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK, false); | |||
| CARLA_SAFE_ASSERT_RETURN(pData->graph.isReady(), false); | |||
| carla_debug("CarlaEngine::patchbayConnect(%u, %u, %u, %u)", groupA, portA, groupB, portB); | |||
| @@ -2163,7 +2192,9 @@ bool CarlaEngine::patchbayConnect(const uint groupA, const uint portA, const uin | |||
| PatchbayGraph* const graph = pData->graph.getPatchbayGraph(); | |||
| CARLA_SAFE_ASSERT_RETURN(graph != nullptr, false); | |||
| #if 0 | |||
| return graph->connect(graph->usingExternal, groupA, portA, groupB, portB, true); | |||
| #endif | |||
| } | |||
| return false; | |||
| @@ -2171,7 +2202,7 @@ bool CarlaEngine::patchbayConnect(const uint groupA, const uint portA, const uin | |||
| bool CarlaEngine::patchbayDisconnect(const uint connectionId) | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY, false); | |||
| CARLA_SAFE_ASSERT_RETURN(pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK, false); | |||
| CARLA_SAFE_ASSERT_RETURN(pData->graph.isReady(), false); | |||
| carla_debug("CarlaEngine::patchbayDisconnect(%u)", connectionId); | |||
| @@ -2187,17 +2218,16 @@ bool CarlaEngine::patchbayDisconnect(const uint connectionId) | |||
| PatchbayGraph* const graph = pData->graph.getPatchbayGraph(); | |||
| CARLA_SAFE_ASSERT_RETURN(graph != nullptr, false); | |||
| #if 0 | |||
| return graph->disconnect(connectionId); | |||
| #endif | |||
| } | |||
| return false; | |||
| } | |||
| bool CarlaEngine::patchbayRefresh(const bool external) | |||
| bool CarlaEngine::patchbayRefresh() | |||
| { | |||
| // subclasses should handle this | |||
| CARLA_SAFE_ASSERT_RETURN(! external, false); | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | |||
| { | |||
| // This is implemented in engine subclasses | |||
| @@ -2205,15 +2235,6 @@ bool CarlaEngine::patchbayRefresh(const bool external) | |||
| return false; | |||
| } | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| { | |||
| PatchbayGraph* const graph = pData->graph.getPatchbayGraph(); | |||
| CARLA_SAFE_ASSERT_RETURN(graph != nullptr, false); | |||
| graph->refresh(""); | |||
| return true; | |||
| } | |||
| setLastError("Unsupported operation"); | |||
| return false; | |||
| } | |||
| @@ -2238,7 +2259,9 @@ const char* const* CarlaEngine::getPatchbayConnections(const bool external) cons | |||
| PatchbayGraph* const graph = pData->graph.getPatchbayGraph(); | |||
| CARLA_SAFE_ASSERT_RETURN(graph != nullptr, nullptr); | |||
| #if 0 | |||
| return graph->getConnections(external); | |||
| #endif | |||
| } | |||
| return nullptr; | |||
| @@ -2272,12 +2295,14 @@ void CarlaEngine::restorePatchbayConnection(const bool external, const char* con | |||
| PatchbayGraph* const graph = pData->graph.getPatchbayGraph(); | |||
| CARLA_SAFE_ASSERT_RETURN(graph != nullptr,); | |||
| #if 0 | |||
| if (! graph->getGroupAndPortIdFromFullName(external, sourcePort, groupA, portA)) | |||
| return; | |||
| if (! graph->getGroupAndPortIdFromFullName(external, targetPort, groupB, portB)) | |||
| return; | |||
| graph->connect(external, groupA, portA, groupB, portB, sendCallback); | |||
| #endif | |||
| } | |||
| } | |||
| @@ -24,16 +24,7 @@ | |||
| #include "CarlaStringList.hpp" | |||
| #include "AppConfig.h" | |||
| #include "juce_audio_processors/juce_audio_processors.h" | |||
| #if 1 | |||
| typedef juce::AudioProcessorGraph CarlaAudioProcessorGraph; | |||
| #else | |||
| typedef juce::AudioProcessorGraphMultiThreaded CarlaAudioProcessorGraph; | |||
| #endif | |||
| using juce::AudioSampleBuffer; | |||
| using juce::MidiBuffer; | |||
| #include "juce_audio_basics/juce_audio_basics.h" | |||
| CARLA_BACKEND_START_NAMESPACE | |||
| @@ -148,6 +139,12 @@ struct RackGraph { | |||
| CARLA_DECLARE_NON_COPY_CLASS(RackGraph) | |||
| }; | |||
| #if 0 | |||
| typedef juce::AudioProcessorGraph CarlaAudioProcessorGraph; | |||
| using juce::AudioSampleBuffer; | |||
| using juce::MidiBuffer; | |||
| // ----------------------------------------------------------------------- | |||
| // PatchbayGraph | |||
| @@ -189,6 +186,7 @@ struct PatchbayGraph { | |||
| CarlaEngine* const kEngine; | |||
| CARLA_DECLARE_NON_COPY_CLASS(PatchbayGraph) | |||
| }; | |||
| #endif | |||
| // ----------------------------------------------------------------------- | |||
| @@ -464,13 +464,6 @@ bool CarlaEngine::ProtectedData::init(const char* const clientName) | |||
| switch (options.processMode) | |||
| { | |||
| case ENGINE_PROCESS_MODE_CONTINUOUS_RACK: | |||
| maxPluginNumber = MAX_RACK_PLUGINS; | |||
| options.forceStereo = true; | |||
| break; | |||
| case ENGINE_PROCESS_MODE_PATCHBAY: | |||
| maxPluginNumber = MAX_PATCHBAY_PLUGINS; | |||
| break; | |||
| case ENGINE_PROCESS_MODE_BRIDGE: | |||
| maxPluginNumber = 1; | |||
| break; | |||
| @@ -482,7 +475,6 @@ bool CarlaEngine::ProtectedData::init(const char* const clientName) | |||
| switch (options.processMode) | |||
| { | |||
| case ENGINE_PROCESS_MODE_CONTINUOUS_RACK: | |||
| case ENGINE_PROCESS_MODE_PATCHBAY: | |||
| case ENGINE_PROCESS_MODE_BRIDGE: | |||
| events.in = new EngineEvent[kMaxEngineEventInternalCount]; | |||
| events.out = new EngineEvent[kMaxEngineEventInternalCount]; | |||
| @@ -811,7 +811,6 @@ public: | |||
| CarlaThread("CarlaEngineJackCallbacks"), | |||
| #endif | |||
| fClient(nullptr), | |||
| fExternalPatchbay(true), | |||
| fFreewheel(false), | |||
| #ifdef BUILD_BRIDGE | |||
| fIsRunning(false) | |||
| @@ -888,8 +887,7 @@ public: | |||
| CARLA_SAFE_ASSERT_RETURN(jackbridge_is_ok(), false); | |||
| carla_debug("CarlaEngineJack::init(\"%s\")", clientName); | |||
| fFreewheel = false; | |||
| fExternalPatchbay = true; | |||
| fFreewheel = false; | |||
| CarlaString truncatedClientName(clientName); | |||
| truncatedClientName.truncate(getMaxClientNameSize()); | |||
| @@ -956,16 +954,14 @@ public: | |||
| fTimebaseMaster = jackbridge_set_timebase_callback(fClient, true, carla_jack_timebase_callback, this); | |||
| if (pData->options.processMode != ENGINE_PROCESS_MODE_PATCHBAY) | |||
| initJackPatchbay(jackClientName); | |||
| initJackPatchbay(jackClientName); | |||
| jackbridge_set_client_registration_callback(fClient, carla_jack_client_registration_callback, this); | |||
| jackbridge_set_port_registration_callback(fClient, carla_jack_port_registration_callback, this); | |||
| jackbridge_set_port_connect_callback(fClient, carla_jack_port_connect_callback, this); | |||
| jackbridge_set_port_rename_callback(fClient, carla_jack_port_rename_callback, this); | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || | |||
| pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | |||
| { | |||
| fRackPorts[kRackPortAudioIn1] = jackbridge_port_register(fClient, "audio-in1", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0); | |||
| fRackPorts[kRackPortAudioIn2] = jackbridge_port_register(fClient, "audio-in2", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0); | |||
| @@ -974,15 +970,8 @@ public: | |||
| fRackPorts[kRackPortEventIn] = jackbridge_port_register(fClient, "events-in", JACK_DEFAULT_MIDI_TYPE, JackPortIsInput, 0); | |||
| fRackPorts[kRackPortEventOut] = jackbridge_port_register(fClient, "events-out", JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput, 0); | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | |||
| { | |||
| pData->graph.create(0, 0); | |||
| } | |||
| else | |||
| { | |||
| pData->graph.create(2, 2); | |||
| patchbayRefresh(false); | |||
| } | |||
| // FIXME | |||
| pData->graph.create(0, 0); | |||
| } | |||
| if (jackbridge_activate(fClient)) | |||
| @@ -992,11 +981,8 @@ public: | |||
| return true; | |||
| } | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || | |||
| pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| { | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | |||
| pData->graph.destroy(); | |||
| } | |||
| pData->close(); | |||
| jackbridge_client_close(fClient); | |||
| @@ -1035,8 +1021,7 @@ public: | |||
| fPostPonedEvents.clear(); | |||
| // clear rack/patchbay stuff | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || | |||
| pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | |||
| { | |||
| if (deactivated) | |||
| { | |||
| @@ -1128,7 +1113,7 @@ public: | |||
| #ifndef BUILD_BRIDGE | |||
| const char* renamePlugin(const uint id, const char* const newName) override | |||
| { | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | |||
| return CarlaEngine::renamePlugin(id, newName); | |||
| CARLA_SAFE_ASSERT_RETURN(pData->plugins != nullptr, nullptr); | |||
| @@ -1277,9 +1262,6 @@ public: | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, false); | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY && ! fExternalPatchbay) | |||
| return CarlaEngine::patchbayConnect(groupA, portA, groupB, portB); | |||
| const char* const fullPortNameA = fUsedPorts.getFullPortName(groupA, portA); | |||
| CARLA_SAFE_ASSERT_RETURN(fullPortNameA != nullptr && fullPortNameA[0] != '\0', false); | |||
| @@ -1299,9 +1281,6 @@ public: | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, false); | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY && ! fExternalPatchbay) | |||
| return CarlaEngine::patchbayDisconnect(connectionId); | |||
| ConnectionToId connectionToId = { 0, 0, 0, 0, 0 }; | |||
| { | |||
| @@ -1338,19 +1317,10 @@ public: | |||
| return true; | |||
| } | |||
| bool patchbayRefresh(const bool external) override | |||
| bool patchbayRefresh() override | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, false); | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| { | |||
| fExternalPatchbay = external; | |||
| pData->graph.setUsingExternal(external); | |||
| if (! external) | |||
| return CarlaEngine::patchbayRefresh(false); | |||
| } | |||
| fUsedGroups.clear(); | |||
| fUsedPorts.clear(); | |||
| fUsedConnections.clear(); | |||
| @@ -1443,9 +1413,6 @@ public: | |||
| CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, nullptr); | |||
| carla_debug("CarlaEngineJack::getPatchbayConnections(%s)", bool2str(external)); | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY && ! external) | |||
| return CarlaEngine::getPatchbayConnections(external); | |||
| CarlaStringList connList; | |||
| if (const char** const ports = jackbridge_get_ports(fClient, nullptr, nullptr, JackPortIsOutput)) | |||
| @@ -1487,9 +1454,6 @@ public: | |||
| CARLA_SAFE_ASSERT_RETURN(connTarget != nullptr && connTarget[0] != '\0',); | |||
| carla_debug("CarlaEngineJack::restorePatchbayConnection(\"%s\", \"%s\")", connSource, connTarget); | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY && ! external) | |||
| return CarlaEngine::restorePatchbayConnection(external, connSource, connTarget, sendCallback); | |||
| if (const jack_port_t* const port = jackbridge_port_by_name(fClient, connSource)) | |||
| { | |||
| if (jackbridge_port_by_name(fClient, connTarget) == nullptr) | |||
| @@ -1640,8 +1604,7 @@ protected: | |||
| } | |||
| } | |||
| } | |||
| else if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || | |||
| pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| else if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(pData->events.in != nullptr,); | |||
| CARLA_SAFE_ASSERT_RETURN(pData->events.out != nullptr,); | |||
| @@ -1761,9 +1724,6 @@ protected: | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(name != nullptr && name[0] != '\0',); | |||
| // ignore this if on internal patchbay mode | |||
| if (! fExternalPatchbay) return; | |||
| // do nothing on client registration, wait for first port | |||
| if (reg) return; | |||
| @@ -1781,9 +1741,6 @@ protected: | |||
| void handleJackPortRegistrationCallback(const jack_port_id_t port, const bool reg) | |||
| { | |||
| // ignore this if on internal patchbay mode | |||
| if (! fExternalPatchbay) return; | |||
| const jack_port_t* const jackPort(jackbridge_port_by_id(fClient, port)); | |||
| CARLA_SAFE_ASSERT_RETURN(jackPort != nullptr,); | |||
| @@ -1836,9 +1793,6 @@ protected: | |||
| void handleJackPortConnectCallback(const jack_port_id_t a, const jack_port_id_t b, const bool connect) | |||
| { | |||
| // ignore this if on internal patchbay mode | |||
| if (! fExternalPatchbay) return; | |||
| const jack_port_t* const jackPortA(jackbridge_port_by_id(fClient, a)); | |||
| CARLA_SAFE_ASSERT_RETURN(jackPortA != nullptr,); | |||
| @@ -1904,9 +1858,6 @@ protected: | |||
| CARLA_SAFE_ASSERT_RETURN(oldFullName != nullptr && oldFullName[0] != '\0',); | |||
| CARLA_SAFE_ASSERT_RETURN(newFullName != nullptr && newFullName[0] != '\0',); | |||
| // ignore this if on internal patchbay mode | |||
| if (! fExternalPatchbay) return; | |||
| const jack_port_t* const jackPort(jackbridge_port_by_id(fClient, port)); | |||
| CARLA_SAFE_ASSERT_RETURN(jackPort != nullptr,); | |||
| @@ -1991,7 +1942,6 @@ protected: | |||
| private: | |||
| jack_client_t* fClient; | |||
| bool fExternalPatchbay; | |||
| bool fFreewheel; | |||
| // ------------------------------------------------------------------- | |||
| @@ -2072,7 +2022,6 @@ private: | |||
| void initJackPatchbay(const char* const ourName) | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(pData->options.processMode != ENGINE_PROCESS_MODE_PATCHBAY || fExternalPatchbay,); | |||
| CARLA_SAFE_ASSERT_RETURN(ourName != nullptr && ourName[0] != '\0',); | |||
| StringArray parsedGroups; | |||
| @@ -1,941 +0,0 @@ | |||
| /* | |||
| * Carla Plugin Host | |||
| * Copyright (C) 2011-2017 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * This program is free software; you can redistribute it and/or | |||
| * modify it under the terms of the GNU General Public License as | |||
| * published by the Free Software Foundation; either version 2 of | |||
| * the License, or any later version. | |||
| * | |||
| * This program is distributed in the hope that it will be useful, | |||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| * GNU General Public License for more details. | |||
| * | |||
| * For a full copy of the GNU General Public License see the GPL.txt file | |||
| */ | |||
| #include "CarlaEngineGraph.hpp" | |||
| #include "CarlaEngineInternal.hpp" | |||
| #include "CarlaBackendUtils.hpp" | |||
| #include "CarlaStringList.hpp" | |||
| #include "RtLinkedList.hpp" | |||
| #include "juce_audio_devices/juce_audio_devices.h" | |||
| using namespace juce; | |||
| CARLA_BACKEND_START_NAMESPACE | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| struct MidiInPort { | |||
| MidiInput* port; | |||
| char name[STR_MAX+1]; | |||
| }; | |||
| struct MidiOutPort { | |||
| MidiOutput* port; | |||
| char name[STR_MAX+1]; | |||
| }; | |||
| struct RtMidiEvent { | |||
| uint64_t time; // needs to compare to internal time | |||
| uint8_t size; | |||
| uint8_t data[EngineMidiEvent::kDataSize]; | |||
| }; | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| // Fallback data | |||
| static const MidiInPort kMidiInPortFallback = { nullptr, { '\0' } }; | |||
| static /* */ MidiInPort kMidiInPortFallbackNC = { nullptr, { '\0' } }; | |||
| static const MidiOutPort kMidiOutPortFallback = { nullptr, { '\0' } }; | |||
| static /* */ MidiOutPort kMidiOutPortFallbackNC = { nullptr, { '\0' } }; | |||
| static const RtMidiEvent kRtMidiEventFallback = { 0, 0, { 0 } }; | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| // Global static data | |||
| static CharStringListPtr gDeviceNames; | |||
| static OwnedArray<AudioIODeviceType> gDeviceTypes; | |||
| struct JuceCleanup : public DeletedAtShutdown { | |||
| JuceCleanup() noexcept {} | |||
| ~JuceCleanup() | |||
| { | |||
| gDeviceTypes.clear(true); | |||
| } | |||
| }; | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| // Cleanup | |||
| static void initJuceDevicesIfNeeded() | |||
| { | |||
| static AudioDeviceManager sDeviceManager; | |||
| if (gDeviceTypes.size() != 0) | |||
| return; | |||
| sDeviceManager.createAudioDeviceTypes(gDeviceTypes); | |||
| CARLA_SAFE_ASSERT_RETURN(gDeviceTypes.size() != 0,); | |||
| new JuceCleanup(); | |||
| // remove JACK from device list | |||
| for (int i=0, count=gDeviceTypes.size(); i < count; ++i) | |||
| { | |||
| if (gDeviceTypes[i]->getTypeName() == "JACK") | |||
| { | |||
| gDeviceTypes.remove(i, true); | |||
| break; | |||
| } | |||
| } | |||
| } | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| // Juce Engine | |||
| class CarlaEngineJuce : public CarlaEngine, | |||
| public AudioIODeviceCallback, | |||
| public MidiInputCallback | |||
| { | |||
| public: | |||
| CarlaEngineJuce(AudioIODeviceType* const devType) | |||
| : CarlaEngine(), | |||
| AudioIODeviceCallback(), | |||
| fDevice(), | |||
| fDeviceType(devType), | |||
| fMidiIns(), | |||
| fMidiInEvents(), | |||
| fMidiOuts(), | |||
| fMidiOutMutex() | |||
| { | |||
| carla_debug("CarlaEngineJuce::CarlaEngineJuce(%p)", devType); | |||
| // just to make sure | |||
| pData->options.transportMode = ENGINE_TRANSPORT_MODE_INTERNAL; | |||
| } | |||
| ~CarlaEngineJuce() override | |||
| { | |||
| carla_debug("CarlaEngineJuce::~CarlaEngineJuce()"); | |||
| } | |||
| // ------------------------------------- | |||
| bool init(const char* const clientName) override | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(clientName != nullptr && clientName[0] != '\0', false); | |||
| carla_debug("CarlaEngineJuce::init(\"%s\")", clientName); | |||
| if (pData->options.processMode != ENGINE_PROCESS_MODE_CONTINUOUS_RACK && pData->options.processMode != ENGINE_PROCESS_MODE_PATCHBAY) | |||
| { | |||
| setLastError("Invalid process mode"); | |||
| return false; | |||
| } | |||
| String deviceName; | |||
| if (pData->options.audioDevice != nullptr && pData->options.audioDevice[0] != '\0') | |||
| { | |||
| deviceName = pData->options.audioDevice; | |||
| } | |||
| else | |||
| { | |||
| const int defaultIndex(fDeviceType->getDefaultDeviceIndex(false)); | |||
| StringArray deviceNames(fDeviceType->getDeviceNames()); | |||
| if (defaultIndex >= 0 && defaultIndex < deviceNames.size()) | |||
| deviceName = deviceNames[defaultIndex]; | |||
| } | |||
| if (deviceName.isEmpty()) | |||
| { | |||
| setLastError("Audio device has not been selected yet and a default one is not available"); | |||
| return false; | |||
| } | |||
| fDevice = fDeviceType->createDevice(deviceName, deviceName); | |||
| if (fDevice == nullptr) | |||
| { | |||
| setLastError("Failed to create device"); | |||
| return false; | |||
| } | |||
| StringArray inputNames(fDevice->getInputChannelNames()); | |||
| StringArray outputNames(fDevice->getOutputChannelNames()); | |||
| if (inputNames.size() < 0 || outputNames.size() <= 0) | |||
| { | |||
| setLastError("Selected device does not have any outputs"); | |||
| return false; | |||
| } | |||
| BigInteger inputChannels; | |||
| inputChannels.setRange(0, inputNames.size(), true); | |||
| BigInteger outputChannels; | |||
| outputChannels.setRange(0, outputNames.size(), true); | |||
| String error = fDevice->open(inputChannels, outputChannels, pData->options.audioSampleRate, static_cast<int>(pData->options.audioBufferSize)); | |||
| if (error.isNotEmpty()) | |||
| { | |||
| setLastError(error.toUTF8()); | |||
| fDevice = nullptr; | |||
| return false; | |||
| } | |||
| if (! pData->init(clientName)) | |||
| { | |||
| close(); | |||
| setLastError("Failed to init internal data"); | |||
| return false; | |||
| } | |||
| pData->bufferSize = static_cast<uint32_t>(fDevice->getCurrentBufferSizeSamples()); | |||
| pData->sampleRate = fDevice->getCurrentSampleRate(); | |||
| pData->initTime(pData->options.transportExtra); | |||
| pData->graph.create(static_cast<uint32_t>(inputNames.size()), static_cast<uint32_t>(outputNames.size())); | |||
| fDevice->start(this); | |||
| patchbayRefresh(false); | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| refreshExternalGraphPorts<PatchbayGraph>(pData->graph.getPatchbayGraph(), false); | |||
| callback(ENGINE_CALLBACK_ENGINE_STARTED, 0, pData->options.processMode, pData->options.transportMode, 0.0f, getCurrentDriverName()); | |||
| return true; | |||
| } | |||
| bool close() override | |||
| { | |||
| carla_debug("CarlaEngineJuce::close()"); | |||
| bool hasError = false; | |||
| // stop stream first | |||
| if (fDevice != nullptr && fDevice->isPlaying()) | |||
| fDevice->stop(); | |||
| // clear engine data | |||
| CarlaEngine::close(); | |||
| pData->graph.destroy(); | |||
| for (LinkedList<MidiInPort>::Itenerator it = fMidiIns.begin2(); it.valid(); it.next()) | |||
| { | |||
| MidiInPort& inPort(it.getValue(kMidiInPortFallbackNC)); | |||
| CARLA_SAFE_ASSERT_CONTINUE(inPort.port != nullptr); | |||
| inPort.port->stop(); | |||
| delete inPort.port; | |||
| } | |||
| fMidiIns.clear(); | |||
| fMidiInEvents.clear(); | |||
| fMidiOutMutex.lock(); | |||
| for (LinkedList<MidiOutPort>::Itenerator it = fMidiOuts.begin2(); it.valid(); it.next()) | |||
| { | |||
| MidiOutPort& outPort(it.getValue(kMidiOutPortFallbackNC)); | |||
| CARLA_SAFE_ASSERT_CONTINUE(outPort.port != nullptr); | |||
| outPort.port->stopBackgroundThread(); | |||
| delete outPort.port; | |||
| } | |||
| fMidiOuts.clear(); | |||
| fMidiOutMutex.unlock(); | |||
| // close stream | |||
| if (fDevice != nullptr) | |||
| { | |||
| if (fDevice->isOpen()) | |||
| fDevice->close(); | |||
| fDevice = nullptr; | |||
| } | |||
| return !hasError; | |||
| } | |||
| bool isRunning() const noexcept override | |||
| { | |||
| return fDevice != nullptr && fDevice->isOpen(); | |||
| } | |||
| bool isOffline() const noexcept override | |||
| { | |||
| return false; | |||
| } | |||
| EngineType getType() const noexcept override | |||
| { | |||
| return kEngineTypeJuce; | |||
| } | |||
| const char* getCurrentDriverName() const noexcept override | |||
| { | |||
| return fDeviceType->getTypeName().toRawUTF8(); | |||
| } | |||
| // ------------------------------------------------------------------- | |||
| // Patchbay | |||
| template<class Graph> | |||
| bool refreshExternalGraphPorts(Graph* const graph, const bool sendCallback) | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(graph != nullptr, false); | |||
| char strBuf[STR_MAX+1]; | |||
| strBuf[STR_MAX] = '\0'; | |||
| ExternalGraph& extGraph(graph->extGraph); | |||
| // --------------------------------------------------------------- | |||
| // clear last ports | |||
| extGraph.clear(); | |||
| // --------------------------------------------------------------- | |||
| // fill in new ones | |||
| // Audio In | |||
| { | |||
| StringArray inputNames(fDevice->getInputChannelNames()); | |||
| for (int i=0, count=inputNames.size(); i<count; ++i) | |||
| { | |||
| PortNameToId portNameToId; | |||
| portNameToId.setData(kExternalGraphGroupAudioIn, uint(i+1), inputNames[i].toRawUTF8(), ""); | |||
| extGraph.audioPorts.ins.append(portNameToId); | |||
| } | |||
| } | |||
| // Audio Out | |||
| { | |||
| StringArray outputNames(fDevice->getOutputChannelNames()); | |||
| for (int i=0, count=outputNames.size(); i<count; ++i) | |||
| { | |||
| PortNameToId portNameToId; | |||
| portNameToId.setData(kExternalGraphGroupAudioOut, uint(i+1), outputNames[i].toRawUTF8(), ""); | |||
| } | |||
| } | |||
| // MIDI In | |||
| { | |||
| StringArray midiIns(MidiInput::getDevices()); | |||
| for (int i=0, count=midiIns.size(); i<count; ++i) | |||
| { | |||
| PortNameToId portNameToId; | |||
| portNameToId.setData(kExternalGraphGroupMidiIn, uint(i+1), midiIns[i].toRawUTF8(), ""); | |||
| extGraph.midiPorts.ins.append(portNameToId); | |||
| } | |||
| } | |||
| // MIDI Out | |||
| { | |||
| StringArray midiOuts(MidiOutput::getDevices()); | |||
| for (int i=0, count=midiOuts.size(); i<count; ++i) | |||
| { | |||
| PortNameToId portNameToId; | |||
| portNameToId.setData(kExternalGraphGroupMidiOut, uint(i+1), midiOuts[i].toRawUTF8(), ""); | |||
| extGraph.midiPorts.outs.append(portNameToId); | |||
| } | |||
| } | |||
| // --------------------------------------------------------------- | |||
| // now refresh | |||
| if (sendCallback) | |||
| { | |||
| String deviceName(fDevice->getName()); | |||
| if (deviceName.isNotEmpty()) | |||
| deviceName = deviceName.dropLastCharacters(deviceName.fromFirstOccurrenceOf(", ", true, false).length()); | |||
| graph->refresh(deviceName.toRawUTF8()); | |||
| } | |||
| // --------------------------------------------------------------- | |||
| // add midi connections | |||
| for (LinkedList<MidiInPort>::Itenerator it=fMidiIns.begin2(); it.valid(); it.next()) | |||
| { | |||
| const MidiInPort& inPort(it.getValue(kMidiInPortFallback)); | |||
| CARLA_SAFE_ASSERT_CONTINUE(inPort.port != nullptr); | |||
| const uint portId(extGraph.midiPorts.getPortId(true, inPort.name)); | |||
| CARLA_SAFE_ASSERT_CONTINUE(portId < extGraph.midiPorts.ins.count()); | |||
| ConnectionToId connectionToId; | |||
| connectionToId.setData(++(extGraph.connections.lastId), kExternalGraphGroupMidiIn, portId, kExternalGraphGroupCarla, kExternalGraphCarlaPortMidiIn); | |||
| std::snprintf(strBuf, STR_MAX, "%i:%i:%i:%i", connectionToId.groupA, connectionToId.portA, connectionToId.groupB, connectionToId.portB); | |||
| callback(ENGINE_CALLBACK_PATCHBAY_CONNECTION_ADDED, connectionToId.id, 0, 0, 0.0f, strBuf); | |||
| extGraph.connections.list.append(connectionToId); | |||
| } | |||
| fMidiOutMutex.lock(); | |||
| for (LinkedList<MidiOutPort>::Itenerator it=fMidiOuts.begin2(); it.valid(); it.next()) | |||
| { | |||
| const MidiOutPort& outPort(it.getValue(kMidiOutPortFallback)); | |||
| CARLA_SAFE_ASSERT_CONTINUE(outPort.port != nullptr); | |||
| const uint portId(extGraph.midiPorts.getPortId(false, outPort.name)); | |||
| CARLA_SAFE_ASSERT_CONTINUE(portId < extGraph.midiPorts.outs.count()); | |||
| ConnectionToId connectionToId; | |||
| connectionToId.setData(++(extGraph.connections.lastId), kExternalGraphGroupCarla, kExternalGraphCarlaPortMidiOut, kExternalGraphGroupMidiOut, portId); | |||
| std::snprintf(strBuf, STR_MAX, "%i:%i:%i:%i", connectionToId.groupA, connectionToId.portA, connectionToId.groupB, connectionToId.portB); | |||
| callback(ENGINE_CALLBACK_PATCHBAY_CONNECTION_ADDED, connectionToId.id, 0, 0, 0.0f, strBuf); | |||
| extGraph.connections.list.append(connectionToId); | |||
| } | |||
| fMidiOutMutex.unlock(); | |||
| return true; | |||
| } | |||
| bool patchbayRefresh(const bool external) override | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(pData->graph.isReady(), false); | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | |||
| { | |||
| return refreshExternalGraphPorts<RackGraph>(pData->graph.getRackGraph(), true); | |||
| } | |||
| else | |||
| { | |||
| pData->graph.setUsingExternal(external); | |||
| if (external) | |||
| return refreshExternalGraphPorts<PatchbayGraph>(pData->graph.getPatchbayGraph(), true); | |||
| else | |||
| return CarlaEngine::patchbayRefresh(false); | |||
| } | |||
| return false; | |||
| } | |||
| // ------------------------------------------------------------------- | |||
| protected: | |||
| void audioDeviceIOCallback(const float** inputChannelData, int numInputChannels, float** outputChannelData, | |||
| int numOutputChannels, int numSamples) override | |||
| { | |||
| const PendingRtEventsRunner prt(this, numSamples); | |||
| // assert juce buffers | |||
| CARLA_SAFE_ASSERT_RETURN(numInputChannels >= 0,); | |||
| CARLA_SAFE_ASSERT_RETURN(numOutputChannels > 0,); | |||
| CARLA_SAFE_ASSERT_RETURN(outputChannelData != nullptr,); | |||
| CARLA_SAFE_ASSERT_RETURN(numSamples == static_cast<int>(pData->bufferSize),); | |||
| const uint32_t nframes(static_cast<uint32_t>(numSamples)); | |||
| // initialize juce output | |||
| for (int i=0; i < numOutputChannels; ++i) | |||
| FloatVectorOperations::clear(outputChannelData[i], numSamples); | |||
| // initialize events | |||
| carla_zeroStructs(pData->events.in, kMaxEngineEventInternalCount); | |||
| carla_zeroStructs(pData->events.out, kMaxEngineEventInternalCount); | |||
| if (fMidiInEvents.mutex.tryLock()) | |||
| { | |||
| uint32_t engineEventIndex = 0; | |||
| fMidiInEvents.splice(); | |||
| for (LinkedList<RtMidiEvent>::Itenerator it = fMidiInEvents.data.begin2(); it.valid(); it.next()) | |||
| { | |||
| const RtMidiEvent& midiEvent(it.getValue(kRtMidiEventFallback)); | |||
| CARLA_SAFE_ASSERT_CONTINUE(midiEvent.size > 0); | |||
| EngineEvent& engineEvent(pData->events.in[engineEventIndex++]); | |||
| if (midiEvent.time < pData->timeInfo.frame) | |||
| { | |||
| engineEvent.time = 0; | |||
| } | |||
| else if (midiEvent.time >= pData->timeInfo.frame + nframes) | |||
| { | |||
| carla_stderr("MIDI Event in the future!, %i vs %i", engineEvent.time, pData->timeInfo.frame); | |||
| engineEvent.time = static_cast<uint32_t>(pData->timeInfo.frame) + nframes - 1; | |||
| } | |||
| else | |||
| engineEvent.time = static_cast<uint32_t>(midiEvent.time - pData->timeInfo.frame); | |||
| engineEvent.fillFromMidiData(midiEvent.size, midiEvent.data, 0); | |||
| if (engineEventIndex >= kMaxEngineEventInternalCount) | |||
| break; | |||
| } | |||
| fMidiInEvents.data.clear(); | |||
| fMidiInEvents.mutex.unlock(); | |||
| } | |||
| pData->graph.process(pData, inputChannelData, outputChannelData, nframes); | |||
| fMidiOutMutex.lock(); | |||
| if (fMidiOuts.count() > 0) | |||
| { | |||
| uint8_t size = 0; | |||
| uint8_t data[3] = { 0, 0, 0 }; | |||
| const uint8_t* dataPtr = data; | |||
| for (ushort i=0; i < kMaxEngineEventInternalCount; ++i) | |||
| { | |||
| const EngineEvent& engineEvent(pData->events.out[i]); | |||
| if (engineEvent.type == kEngineEventTypeNull) | |||
| break; | |||
| else if (engineEvent.type == kEngineEventTypeControl) | |||
| { | |||
| const EngineControlEvent& ctrlEvent(engineEvent.ctrl); | |||
| ctrlEvent.convertToMidiData(engineEvent.channel, size, data); | |||
| dataPtr = data; | |||
| } | |||
| else if (engineEvent.type == kEngineEventTypeMidi) | |||
| { | |||
| const EngineMidiEvent& midiEvent(engineEvent.midi); | |||
| size = midiEvent.size; | |||
| if (size > EngineMidiEvent::kDataSize && midiEvent.dataExt != nullptr) | |||
| dataPtr = midiEvent.dataExt; | |||
| else | |||
| dataPtr = midiEvent.data; | |||
| } | |||
| else | |||
| { | |||
| continue; | |||
| } | |||
| if (size > 0) | |||
| { | |||
| MidiMessage message(static_cast<const void*>(dataPtr), static_cast<int>(size), static_cast<double>(engineEvent.time)/nframes); | |||
| for (LinkedList<MidiOutPort>::Itenerator it=fMidiOuts.begin2(); it.valid(); it.next()) | |||
| { | |||
| MidiOutPort& outPort(it.getValue(kMidiOutPortFallbackNC)); | |||
| CARLA_SAFE_ASSERT_CONTINUE(outPort.port != nullptr); | |||
| outPort.port->sendMessageNow(message); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| fMidiOutMutex.unlock(); | |||
| } | |||
| void audioDeviceAboutToStart(AudioIODevice* /*device*/) override | |||
| { | |||
| } | |||
| void audioDeviceStopped() override | |||
| { | |||
| } | |||
| void audioDeviceError(const String& errorMessage) override | |||
| { | |||
| callback(ENGINE_CALLBACK_ERROR, 0, 0, 0, 0.0f, errorMessage.toRawUTF8()); | |||
| } | |||
| // ------------------------------------------------------------------- | |||
| void handleIncomingMidiMessage(MidiInput* /*source*/, const MidiMessage& message) override | |||
| { | |||
| const int messageSize(message.getRawDataSize()); | |||
| if (messageSize <= 0 || messageSize > EngineMidiEvent::kDataSize) | |||
| return; | |||
| const uint8_t* const messageData(message.getRawData()); | |||
| RtMidiEvent midiEvent; | |||
| midiEvent.time = 0; // TODO | |||
| midiEvent.size = static_cast<uint8_t>(messageSize); | |||
| int i=0; | |||
| for (; i < messageSize; ++i) | |||
| midiEvent.data[i] = messageData[i]; | |||
| for (; i < EngineMidiEvent::kDataSize; ++i) | |||
| midiEvent.data[i] = 0; | |||
| fMidiInEvents.append(midiEvent); | |||
| } | |||
| // ------------------------------------------------------------------- | |||
| bool connectExternalGraphPort(const uint connectionType, const uint portId, const char* const portName) override | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(connectionType != 0 || (portName != nullptr && portName[0] != '\0'), false); | |||
| carla_stdout("CarlaEngineJuce::connectExternalGraphPort(%u, %u, \"%s\")", connectionType, portId, portName); | |||
| switch (connectionType) | |||
| { | |||
| case kExternalGraphConnectionAudioIn1: | |||
| case kExternalGraphConnectionAudioIn2: | |||
| case kExternalGraphConnectionAudioOut1: | |||
| case kExternalGraphConnectionAudioOut2: | |||
| return CarlaEngine::connectExternalGraphPort(connectionType, portId, portName); | |||
| case kExternalGraphConnectionMidiInput: { | |||
| StringArray midiIns(MidiInput::getDevices()); | |||
| if (! midiIns.contains(portName)) | |||
| return false; | |||
| MidiInput* const juceMidiIn(MidiInput::openDevice(midiIns.indexOf(portName), this)); | |||
| juceMidiIn->start(); | |||
| MidiInPort midiPort; | |||
| midiPort.port = juceMidiIn; | |||
| std::strncpy(midiPort.name, portName, STR_MAX); | |||
| midiPort.name[STR_MAX] = '\0'; | |||
| fMidiIns.append(midiPort); | |||
| return true; | |||
| } break; | |||
| case kExternalGraphConnectionMidiOutput: { | |||
| StringArray midiOuts(MidiOutput::getDevices()); | |||
| if (! midiOuts.contains(portName)) | |||
| return false; | |||
| MidiOutput* const juceMidiOut(MidiOutput::openDevice(midiOuts.indexOf(portName))); | |||
| juceMidiOut->startBackgroundThread(); | |||
| MidiOutPort midiPort; | |||
| midiPort.port = juceMidiOut; | |||
| std::strncpy(midiPort.name, portName, STR_MAX); | |||
| midiPort.name[STR_MAX] = '\0'; | |||
| const CarlaMutexLocker cml(fMidiOutMutex); | |||
| fMidiOuts.append(midiPort); | |||
| return true; | |||
| } break; | |||
| } | |||
| return false; | |||
| } | |||
| bool disconnectExternalGraphPort(const uint connectionType, const uint portId, const char* const portName) override | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(connectionType != 0 || (portName != nullptr && portName[0] != '\0'), false); | |||
| carla_debug("CarlaEngineJuce::disconnectExternalGraphPort(%u, %u, \"%s\")", connectionType, portId, portName); | |||
| switch (connectionType) | |||
| { | |||
| case kExternalGraphConnectionAudioIn1: | |||
| case kExternalGraphConnectionAudioIn2: | |||
| case kExternalGraphConnectionAudioOut1: | |||
| case kExternalGraphConnectionAudioOut2: | |||
| return CarlaEngine::disconnectExternalGraphPort(connectionType, portId, portName); | |||
| case kExternalGraphConnectionMidiInput: | |||
| for (LinkedList<MidiInPort>::Itenerator it=fMidiIns.begin2(); it.valid(); it.next()) | |||
| { | |||
| MidiInPort& inPort(it.getValue(kMidiInPortFallbackNC)); | |||
| CARLA_SAFE_ASSERT_CONTINUE(inPort.port != nullptr); | |||
| if (std::strcmp(inPort.name, portName) != 0) | |||
| continue; | |||
| inPort.port->stop(); | |||
| delete inPort.port; | |||
| fMidiIns.remove(it); | |||
| return true; | |||
| } | |||
| break; | |||
| case kExternalGraphConnectionMidiOutput: { | |||
| const CarlaMutexLocker cml(fMidiOutMutex); | |||
| for (LinkedList<MidiOutPort>::Itenerator it=fMidiOuts.begin2(); it.valid(); it.next()) | |||
| { | |||
| MidiOutPort& outPort(it.getValue(kMidiOutPortFallbackNC)); | |||
| CARLA_SAFE_ASSERT_CONTINUE(outPort.port != nullptr); | |||
| if (std::strcmp(outPort.name, portName) != 0) | |||
| continue; | |||
| outPort.port->stopBackgroundThread(); | |||
| delete outPort.port; | |||
| fMidiOuts.remove(it); | |||
| return true; | |||
| } | |||
| } break; | |||
| } | |||
| return false; | |||
| } | |||
| // ------------------------------------- | |||
| private: | |||
| ScopedPointer<AudioIODevice> fDevice; | |||
| AudioIODeviceType* const fDeviceType; | |||
| struct RtMidiEvents { | |||
| CarlaMutex mutex; | |||
| RtLinkedList<RtMidiEvent>::Pool dataPool; | |||
| RtLinkedList<RtMidiEvent> data; | |||
| RtLinkedList<RtMidiEvent> dataPending; | |||
| RtMidiEvents() | |||
| : mutex(), | |||
| dataPool(512, 512), | |||
| data(dataPool), | |||
| dataPending(dataPool) {} | |||
| ~RtMidiEvents() | |||
| { | |||
| clear(); | |||
| } | |||
| void append(const RtMidiEvent& event) | |||
| { | |||
| mutex.lock(); | |||
| dataPending.append(event); | |||
| mutex.unlock(); | |||
| } | |||
| void clear() | |||
| { | |||
| mutex.lock(); | |||
| data.clear(); | |||
| dataPending.clear(); | |||
| mutex.unlock(); | |||
| } | |||
| void splice() | |||
| { | |||
| if (dataPending.count() > 0) | |||
| dataPending.moveTo(data, true /* append */); | |||
| } | |||
| }; | |||
| LinkedList<MidiInPort> fMidiIns; | |||
| RtMidiEvents fMidiInEvents; | |||
| LinkedList<MidiOutPort> fMidiOuts; | |||
| CarlaMutex fMidiOutMutex; | |||
| CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaEngineJuce) | |||
| }; | |||
| // ----------------------------------------- | |||
| CarlaEngine* CarlaEngine::newJuce(const AudioApi api) | |||
| { | |||
| initJuceDevicesIfNeeded(); | |||
| String juceApi; | |||
| switch (api) | |||
| { | |||
| case AUDIO_API_NULL: | |||
| case AUDIO_API_OSS: | |||
| case AUDIO_API_PULSE: | |||
| break; | |||
| case AUDIO_API_JACK: | |||
| juceApi = "JACK"; | |||
| break; | |||
| case AUDIO_API_ALSA: | |||
| juceApi = "ALSA"; | |||
| break; | |||
| case AUDIO_API_CORE: | |||
| juceApi = "CoreAudio"; | |||
| break; | |||
| case AUDIO_API_ASIO: | |||
| juceApi = "ASIO"; | |||
| break; | |||
| case AUDIO_API_DS: | |||
| juceApi = "DirectSound"; | |||
| break; | |||
| } | |||
| if (juceApi.isEmpty()) | |||
| return nullptr; | |||
| AudioIODeviceType* deviceType = nullptr; | |||
| for (int i=0, count=gDeviceTypes.size(); i < count; ++i) | |||
| { | |||
| deviceType = gDeviceTypes[i]; | |||
| if (deviceType == nullptr || deviceType->getTypeName() == juceApi) | |||
| break; | |||
| } | |||
| if (deviceType == nullptr) | |||
| return nullptr; | |||
| deviceType->scanForDevices(); | |||
| return new CarlaEngineJuce(deviceType); | |||
| } | |||
| uint CarlaEngine::getJuceApiCount() | |||
| { | |||
| initJuceDevicesIfNeeded(); | |||
| return static_cast<uint>(gDeviceTypes.size()); | |||
| } | |||
| const char* CarlaEngine::getJuceApiName(const uint uindex) | |||
| { | |||
| initJuceDevicesIfNeeded(); | |||
| const int index(static_cast<int>(uindex)); | |||
| CARLA_SAFE_ASSERT_RETURN(index < gDeviceTypes.size(), nullptr); | |||
| AudioIODeviceType* const deviceType(gDeviceTypes[index]); | |||
| CARLA_SAFE_ASSERT_RETURN(deviceType != nullptr, nullptr); | |||
| return deviceType->getTypeName().toRawUTF8(); | |||
| } | |||
| const char* const* CarlaEngine::getJuceApiDeviceNames(const uint uindex) | |||
| { | |||
| initJuceDevicesIfNeeded(); | |||
| const int index(static_cast<int>(uindex)); | |||
| CARLA_SAFE_ASSERT_RETURN(index < gDeviceTypes.size(), nullptr); | |||
| AudioIODeviceType* const deviceType(gDeviceTypes[index]); | |||
| CARLA_SAFE_ASSERT_RETURN(deviceType != nullptr, nullptr); | |||
| deviceType->scanForDevices(); | |||
| StringArray juceDeviceNames(deviceType->getDeviceNames()); | |||
| const int juceDeviceNameCount(juceDeviceNames.size()); | |||
| if (juceDeviceNameCount <= 0) | |||
| return nullptr; | |||
| CarlaStringList devNames; | |||
| for (int i=0; i < juceDeviceNameCount; ++i) | |||
| devNames.append(juceDeviceNames[i].toRawUTF8()); | |||
| gDeviceNames = devNames.toCharStringListPtr(); | |||
| return gDeviceNames; | |||
| } | |||
| const EngineDriverDeviceInfo* CarlaEngine::getJuceDeviceInfo(const uint uindex, const char* const deviceName) | |||
| { | |||
| initJuceDevicesIfNeeded(); | |||
| const int index(static_cast<int>(uindex)); | |||
| CARLA_SAFE_ASSERT_RETURN(index < gDeviceTypes.size(), nullptr); | |||
| AudioIODeviceType* const deviceType(gDeviceTypes[index]); | |||
| CARLA_SAFE_ASSERT_RETURN(deviceType != nullptr, nullptr); | |||
| deviceType->scanForDevices(); | |||
| ScopedPointer<AudioIODevice> device(deviceType->createDevice(deviceName, deviceName)); | |||
| if (device == nullptr) | |||
| return nullptr; | |||
| static EngineDriverDeviceInfo devInfo = { 0x0, nullptr, nullptr }; | |||
| static uint32_t dummyBufferSizes[11] = { 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 0 }; | |||
| static double dummySampleRates[14] = { 22050.0, 32000.0, 44100.0, 48000.0, 88200.0, 96000.0, 176400.0, 192000.0, 0.0 }; | |||
| // reset | |||
| devInfo.hints = ENGINE_DRIVER_DEVICE_VARIABLE_BUFFER_SIZE | ENGINE_DRIVER_DEVICE_VARIABLE_SAMPLE_RATE; | |||
| // cleanup | |||
| if (devInfo.bufferSizes != nullptr && devInfo.bufferSizes != dummyBufferSizes) | |||
| { | |||
| delete[] devInfo.bufferSizes; | |||
| devInfo.bufferSizes = nullptr; | |||
| } | |||
| if (devInfo.sampleRates != nullptr && devInfo.sampleRates != dummySampleRates) | |||
| { | |||
| delete[] devInfo.sampleRates; | |||
| devInfo.sampleRates = nullptr; | |||
| } | |||
| if (device->hasControlPanel()) | |||
| devInfo.hints |= ENGINE_DRIVER_DEVICE_HAS_CONTROL_PANEL; | |||
| Array<int> juceBufferSizes = device->getAvailableBufferSizes(); | |||
| if (int bufferSizesCount = juceBufferSizes.size()) | |||
| { | |||
| uint32_t* const bufferSizes(new uint32_t[bufferSizesCount+1]); | |||
| for (int i=0; i < bufferSizesCount; ++i) | |||
| bufferSizes[i] = static_cast<uint32_t>(juceBufferSizes[i]); | |||
| bufferSizes[bufferSizesCount] = 0; | |||
| devInfo.bufferSizes = bufferSizes; | |||
| } | |||
| else | |||
| { | |||
| devInfo.bufferSizes = dummyBufferSizes; | |||
| } | |||
| Array<double> juceSampleRates = device->getAvailableSampleRates(); | |||
| if (int sampleRatesCount = juceSampleRates.size()) | |||
| { | |||
| double* const sampleRates(new double[sampleRatesCount+1]); | |||
| for (int i=0; i < sampleRatesCount; ++i) | |||
| sampleRates[i] = juceSampleRates[i]; | |||
| sampleRates[sampleRatesCount] = 0.0; | |||
| devInfo.sampleRates = sampleRates; | |||
| } | |||
| else | |||
| { | |||
| devInfo.sampleRates = dummySampleRates; | |||
| } | |||
| return &devInfo; | |||
| } | |||
| // ----------------------------------------- | |||
| CARLA_BACKEND_END_NAMESPACE | |||
| @@ -36,17 +36,9 @@ | |||
| #include "juce_audio_basics/juce_audio_basics.h" | |||
| #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
| # include "juce_gui_basics/juce_gui_basics.h" | |||
| #else | |||
| # include "juce_events/juce_events.h" | |||
| #endif | |||
| using juce::File; | |||
| using juce::FloatVectorOperations; | |||
| using juce::MemoryOutputStream; | |||
| using juce::MessageManager; | |||
| using juce::ScopedJuceInitialiser_GUI; | |||
| using juce::ScopedPointer; | |||
| using juce::SharedResourcePointer; | |||
| using juce::String; | |||
| @@ -55,62 +47,6 @@ using juce::XmlElement; | |||
| CARLA_BACKEND_START_NAMESPACE | |||
| #if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)) | |||
| static int numScopedInitInstances = 0; | |||
| class SharedMessageThread : public juce::Thread | |||
| { | |||
| public: | |||
| SharedMessageThread() | |||
| : juce::Thread ("SharedMessageThread"), | |||
| initialised (false) {} | |||
| ~SharedMessageThread() | |||
| { | |||
| CARLA_SAFE_ASSERT(numScopedInitInstances == 0); | |||
| // in case something fails | |||
| MessageManager::getInstance()->stopDispatchLoop(); | |||
| waitForThreadToExit (5000); | |||
| } | |||
| void incRef() | |||
| { | |||
| if (numScopedInitInstances++ == 0) | |||
| { | |||
| startThread (7); | |||
| while (! initialised) | |||
| sleep (1); | |||
| } | |||
| } | |||
| void decRef() | |||
| { | |||
| if (--numScopedInitInstances == 0) | |||
| { | |||
| MessageManager::getInstance()->stopDispatchLoop(); | |||
| waitForThreadToExit (5000); | |||
| } | |||
| } | |||
| protected: | |||
| void run() override | |||
| { | |||
| const ScopedJuceInitialiser_GUI juceInitialiser; | |||
| MessageManager::getInstance()->setCurrentThreadAsMessageThread(); | |||
| initialised = true; | |||
| MessageManager::getInstance()->runDispatchLoop(); | |||
| } | |||
| private: | |||
| volatile bool initialised; | |||
| }; | |||
| #endif | |||
| // ----------------------------------------------------------------------- | |||
| class CarlaEngineNativeUI : public CarlaExternalUI | |||
| @@ -225,7 +161,7 @@ protected: | |||
| else if (std::strcmp(msg, "patchbay_refresh") == 0) | |||
| { | |||
| try { | |||
| ok = fEngine->patchbayRefresh(false); | |||
| ok = fEngine->patchbayRefresh(); | |||
| } CARLA_SAFE_EXCEPTION("patchbayRefresh"); | |||
| } | |||
| else if (std::strcmp(msg, "transport_play") == 0) | |||
| @@ -653,14 +589,9 @@ private: | |||
| class CarlaEngineNative : public CarlaEngine | |||
| { | |||
| public: | |||
| CarlaEngineNative(const NativeHostDescriptor* const host, const bool isPatchbay, const uint32_t inChan = 2, uint32_t outChan = 0) | |||
| CarlaEngineNative(const NativeHostDescriptor* const host, const uint32_t inChan = 2, uint32_t outChan = 0) | |||
| : CarlaEngine(), | |||
| pHost(host), | |||
| #if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)) | |||
| kNeedsJuceMsgThread(host->dispatcher(pHost->handle, | |||
| NATIVE_HOST_OPCODE_INTERNAL_PLUGIN, 0, 0, nullptr, 0.0f) == 0), | |||
| #endif | |||
| kIsPatchbay(isPatchbay), | |||
| fIsActive(false), | |||
| fIsRunning(false), | |||
| fUiServer(this), | |||
| @@ -678,34 +609,15 @@ public: | |||
| if (outChan == 0) | |||
| outChan = inChan; | |||
| #if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)) | |||
| if (kNeedsJuceMsgThread) | |||
| fJuceMsgThread->incRef(); | |||
| #endif | |||
| // set-up engine | |||
| if (kIsPatchbay) | |||
| { | |||
| pData->options.processMode = ENGINE_PROCESS_MODE_PATCHBAY; | |||
| pData->options.transportMode = ENGINE_TRANSPORT_MODE_PLUGIN; | |||
| pData->options.forceStereo = false; | |||
| pData->options.preferPluginBridges = false; | |||
| pData->options.preferUiBridges = false; | |||
| init("Carla-Patchbay"); | |||
| pData->graph.create(inChan, outChan); | |||
| } | |||
| else | |||
| { | |||
| CARLA_SAFE_ASSERT(inChan == 2); | |||
| CARLA_SAFE_ASSERT(outChan == 2); | |||
| pData->options.processMode = ENGINE_PROCESS_MODE_CONTINUOUS_RACK; | |||
| pData->options.transportMode = ENGINE_TRANSPORT_MODE_PLUGIN; | |||
| pData->options.forceStereo = true; | |||
| pData->options.preferPluginBridges = false; | |||
| pData->options.preferUiBridges = false; | |||
| init("Carla-Rack"); | |||
| pData->graph.create(0, 0); | |||
| } | |||
| CARLA_SAFE_ASSERT(inChan == 2); | |||
| CARLA_SAFE_ASSERT(outChan == 2); | |||
| pData->options.processMode = ENGINE_PROCESS_MODE_CONTINUOUS_RACK; | |||
| pData->options.transportMode = ENGINE_TRANSPORT_MODE_PLUGIN; | |||
| pData->options.forceStereo = true; | |||
| pData->options.preferPluginBridges = false; | |||
| pData->options.preferUiBridges = false; | |||
| init("Carla-Rack"); | |||
| pData->graph.create(0, 0); // FIXME? | |||
| if (pData->options.resourceDir != nullptr) | |||
| delete[] pData->options.resourceDir; | |||
| @@ -732,11 +644,6 @@ public: | |||
| pData->graph.destroy(); | |||
| #if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)) | |||
| if (kNeedsJuceMsgThread) | |||
| fJuceMsgThread->decRef(); | |||
| #endif | |||
| carla_debug("CarlaEngineNative::~CarlaEngineNative() - END"); | |||
| } | |||
| @@ -1437,7 +1344,7 @@ protected: | |||
| // --------------------------------------------------------------- | |||
| // Do nothing if no plugins and rack mode | |||
| if (pData->curPluginCount == 0 && ! kIsPatchbay) | |||
| if (pData->curPluginCount == 0) | |||
| { | |||
| if (outBuffer[0] != inBuffer[0]) | |||
| FloatVectorOperations::copy(outBuffer[0], inBuffer[0], static_cast<int>(frames)); | |||
| @@ -1478,14 +1385,6 @@ protected: | |||
| } | |||
| } | |||
| if (kIsPatchbay) | |||
| { | |||
| // ----------------------------------------------------------- | |||
| // process | |||
| pData->graph.process(pData, inBuffer, outBuffer, frames); | |||
| } | |||
| else | |||
| { | |||
| // ----------------------------------------------------------- | |||
| // create audio buffers | |||
| @@ -1560,10 +1459,7 @@ protected: | |||
| CarlaString path(pHost->resourceDir); | |||
| if (kIsPatchbay) | |||
| path += CARLA_OS_SEP_STR "carla-plugin-patchbay"; | |||
| else | |||
| path += CARLA_OS_SEP_STR "carla-plugin"; | |||
| path += CARLA_OS_SEP_STR "carla-plugin"; | |||
| #ifdef CARLA_OS_WIN | |||
| path += ".exe"; | |||
| #endif | |||
| @@ -1593,9 +1489,6 @@ protected: | |||
| } | |||
| } | |||
| if (kIsPatchbay) | |||
| patchbayRefresh(false); | |||
| if (fWaitForReadyMsg) | |||
| { | |||
| carla_stdout("Using Carla plugin embedded, waiting for it to be ready..."); | |||
| @@ -1763,26 +1656,6 @@ public: | |||
| return new CarlaEngineNative(host, false); | |||
| } | |||
| static NativePluginHandle _instantiatePatchbay(const NativeHostDescriptor* host) | |||
| { | |||
| return new CarlaEngineNative(host, true); | |||
| } | |||
| static NativePluginHandle _instantiatePatchbay3s(const NativeHostDescriptor* host) | |||
| { | |||
| return new CarlaEngineNative(host, true, 3, 2); | |||
| } | |||
| static NativePluginHandle _instantiatePatchbay16(const NativeHostDescriptor* host) | |||
| { | |||
| return new CarlaEngineNative(host, true, 16); | |||
| } | |||
| static NativePluginHandle _instantiatePatchbay32(const NativeHostDescriptor* host) | |||
| { | |||
| return new CarlaEngineNative(host, true, 32); | |||
| } | |||
| static void _cleanup(NativePluginHandle handle) | |||
| { | |||
| delete handlePtr; | |||
| @@ -1906,12 +1779,6 @@ public: | |||
| private: | |||
| const NativeHostDescriptor* const pHost; | |||
| #if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)) | |||
| const bool kNeedsJuceMsgThread; | |||
| const SharedResourcePointer<SharedMessageThread> fJuceMsgThread; | |||
| #endif | |||
| const bool kIsPatchbay; // rack if false | |||
| bool fIsActive, fIsRunning; | |||
| CarlaEngineNativeUI fUiServer; | |||
| @@ -1979,174 +1846,6 @@ static const NativePluginDescriptor carlaRackDesc = { | |||
| CarlaEngineNative::_dispatcher | |||
| }; | |||
| static const NativePluginDescriptor carlaPatchbayDesc = { | |||
| /* category */ NATIVE_PLUGIN_CATEGORY_OTHER, | |||
| /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH | |||
| |NATIVE_PLUGIN_HAS_UI | |||
| //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS | |||
| |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD | |||
| |NATIVE_PLUGIN_USES_STATE | |||
| |NATIVE_PLUGIN_USES_TIME), | |||
| /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING), | |||
| /* audioIns */ 2, | |||
| /* audioOuts */ 2, | |||
| /* midiIns */ 1, | |||
| /* midiOuts */ 1, | |||
| /* paramIns */ 0, | |||
| /* paramOuts */ 0, | |||
| /* name */ "Carla-Patchbay", | |||
| /* label */ "carlapatchbay", | |||
| /* maker */ "falkTX", | |||
| /* copyright */ "GNU GPL v2+", | |||
| CarlaEngineNative::_instantiatePatchbay, | |||
| CarlaEngineNative::_cleanup, | |||
| CarlaEngineNative::_get_parameter_count, | |||
| CarlaEngineNative::_get_parameter_info, | |||
| CarlaEngineNative::_get_parameter_value, | |||
| CarlaEngineNative::_get_midi_program_count, | |||
| CarlaEngineNative::_get_midi_program_info, | |||
| CarlaEngineNative::_set_parameter_value, | |||
| CarlaEngineNative::_set_midi_program, | |||
| /* _set_custom_data */ nullptr, | |||
| CarlaEngineNative::_ui_show, | |||
| CarlaEngineNative::_ui_idle, | |||
| /* _ui_set_parameter_value */ nullptr, | |||
| /* _ui_set_midi_program */ nullptr, | |||
| /* _ui_set_custom_data */ nullptr, | |||
| CarlaEngineNative::_activate, | |||
| CarlaEngineNative::_deactivate, | |||
| CarlaEngineNative::_process, | |||
| CarlaEngineNative::_get_state, | |||
| CarlaEngineNative::_set_state, | |||
| CarlaEngineNative::_dispatcher | |||
| }; | |||
| static const NativePluginDescriptor carlaPatchbay3sDesc = { | |||
| /* category */ NATIVE_PLUGIN_CATEGORY_OTHER, | |||
| /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH | |||
| |NATIVE_PLUGIN_HAS_UI | |||
| //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS | |||
| |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD | |||
| |NATIVE_PLUGIN_USES_STATE | |||
| |NATIVE_PLUGIN_USES_TIME), | |||
| /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING), | |||
| /* audioIns */ 3, | |||
| /* audioOuts */ 2, | |||
| /* midiIns */ 1, | |||
| /* midiOuts */ 1, | |||
| /* paramIns */ 0, | |||
| /* paramOuts */ 0, | |||
| /* name */ "Carla-Patchbay (sidechain)", | |||
| /* label */ "carlapatchbay3s", | |||
| /* maker */ "falkTX", | |||
| /* copyright */ "GNU GPL v2+", | |||
| CarlaEngineNative::_instantiatePatchbay3s, | |||
| CarlaEngineNative::_cleanup, | |||
| CarlaEngineNative::_get_parameter_count, | |||
| CarlaEngineNative::_get_parameter_info, | |||
| CarlaEngineNative::_get_parameter_value, | |||
| CarlaEngineNative::_get_midi_program_count, | |||
| CarlaEngineNative::_get_midi_program_info, | |||
| CarlaEngineNative::_set_parameter_value, | |||
| CarlaEngineNative::_set_midi_program, | |||
| /* _set_custom_data */ nullptr, | |||
| CarlaEngineNative::_ui_show, | |||
| CarlaEngineNative::_ui_idle, | |||
| /* _ui_set_parameter_value */ nullptr, | |||
| /* _ui_set_midi_program */ nullptr, | |||
| /* _ui_set_custom_data */ nullptr, | |||
| CarlaEngineNative::_activate, | |||
| CarlaEngineNative::_deactivate, | |||
| CarlaEngineNative::_process, | |||
| CarlaEngineNative::_get_state, | |||
| CarlaEngineNative::_set_state, | |||
| CarlaEngineNative::_dispatcher | |||
| }; | |||
| static const NativePluginDescriptor carlaPatchbay16Desc = { | |||
| /* category */ NATIVE_PLUGIN_CATEGORY_OTHER, | |||
| /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH | |||
| |NATIVE_PLUGIN_HAS_UI | |||
| //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS | |||
| |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD | |||
| |NATIVE_PLUGIN_USES_STATE | |||
| |NATIVE_PLUGIN_USES_TIME), | |||
| /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING), | |||
| /* audioIns */ 16, | |||
| /* audioOuts */ 16, | |||
| /* midiIns */ 1, | |||
| /* midiOuts */ 1, | |||
| /* paramIns */ 0, | |||
| /* paramOuts */ 0, | |||
| /* name */ "Carla-Patchbay (16chan)", | |||
| /* label */ "carlapatchbay16", | |||
| /* maker */ "falkTX", | |||
| /* copyright */ "GNU GPL v2+", | |||
| CarlaEngineNative::_instantiatePatchbay16, | |||
| CarlaEngineNative::_cleanup, | |||
| CarlaEngineNative::_get_parameter_count, | |||
| CarlaEngineNative::_get_parameter_info, | |||
| CarlaEngineNative::_get_parameter_value, | |||
| CarlaEngineNative::_get_midi_program_count, | |||
| CarlaEngineNative::_get_midi_program_info, | |||
| CarlaEngineNative::_set_parameter_value, | |||
| CarlaEngineNative::_set_midi_program, | |||
| /* _set_custom_data */ nullptr, | |||
| CarlaEngineNative::_ui_show, | |||
| CarlaEngineNative::_ui_idle, | |||
| /* _ui_set_parameter_value */ nullptr, | |||
| /* _ui_set_midi_program */ nullptr, | |||
| /* _ui_set_custom_data */ nullptr, | |||
| CarlaEngineNative::_activate, | |||
| CarlaEngineNative::_deactivate, | |||
| CarlaEngineNative::_process, | |||
| CarlaEngineNative::_get_state, | |||
| CarlaEngineNative::_set_state, | |||
| CarlaEngineNative::_dispatcher | |||
| }; | |||
| static const NativePluginDescriptor carlaPatchbay32Desc = { | |||
| /* category */ NATIVE_PLUGIN_CATEGORY_OTHER, | |||
| /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH | |||
| |NATIVE_PLUGIN_HAS_UI | |||
| //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS | |||
| |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD | |||
| |NATIVE_PLUGIN_USES_STATE | |||
| |NATIVE_PLUGIN_USES_TIME), | |||
| /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING), | |||
| /* audioIns */ 32, | |||
| /* audioOuts */ 32, | |||
| /* midiIns */ 1, | |||
| /* midiOuts */ 1, | |||
| /* paramIns */ 0, | |||
| /* paramOuts */ 0, | |||
| /* name */ "Carla-Patchbay (32chan)", | |||
| /* label */ "carlapatchbay32", | |||
| /* maker */ "falkTX", | |||
| /* copyright */ "GNU GPL v2+", | |||
| CarlaEngineNative::_instantiatePatchbay32, | |||
| CarlaEngineNative::_cleanup, | |||
| CarlaEngineNative::_get_parameter_count, | |||
| CarlaEngineNative::_get_parameter_info, | |||
| CarlaEngineNative::_get_parameter_value, | |||
| CarlaEngineNative::_get_midi_program_count, | |||
| CarlaEngineNative::_get_midi_program_info, | |||
| CarlaEngineNative::_set_parameter_value, | |||
| CarlaEngineNative::_set_midi_program, | |||
| /* _set_custom_data */ nullptr, | |||
| CarlaEngineNative::_ui_show, | |||
| CarlaEngineNative::_ui_idle, | |||
| /* _ui_set_parameter_value */ nullptr, | |||
| /* _ui_set_midi_program */ nullptr, | |||
| /* _ui_set_custom_data */ nullptr, | |||
| CarlaEngineNative::_activate, | |||
| CarlaEngineNative::_deactivate, | |||
| CarlaEngineNative::_process, | |||
| CarlaEngineNative::_get_state, | |||
| CarlaEngineNative::_set_state, | |||
| CarlaEngineNative::_dispatcher | |||
| }; | |||
| CARLA_BACKEND_END_NAMESPACE | |||
| // ----------------------------------------------------------------------- | |||
| @@ -2158,10 +1857,6 @@ void carla_register_native_plugin_carla() | |||
| { | |||
| CARLA_BACKEND_USE_NAMESPACE; | |||
| carla_register_native_plugin(&carlaRackDesc); | |||
| carla_register_native_plugin(&carlaPatchbayDesc); | |||
| carla_register_native_plugin(&carlaPatchbay3sDesc); | |||
| carla_register_native_plugin(&carlaPatchbay16Desc); | |||
| carla_register_native_plugin(&carlaPatchbay32Desc); | |||
| } | |||
| // ----------------------------------------------------------------------- | |||
| @@ -2174,14 +1869,6 @@ const NativePluginDescriptor* carla_get_native_rack_plugin() | |||
| return &carlaRackDesc; | |||
| } | |||
| CARLA_EXPORT | |||
| const NativePluginDescriptor* carla_get_native_patchbay_plugin(); | |||
| const NativePluginDescriptor* carla_get_native_patchbay_plugin() | |||
| { | |||
| CARLA_BACKEND_USE_NAMESPACE; | |||
| return &carlaPatchbayDesc; | |||
| } | |||
| // ----------------------------------------------------------------------- | |||
| // Extra stuff for linking purposes | |||
| @@ -2191,19 +1878,11 @@ CARLA_BACKEND_START_NAMESPACE | |||
| CarlaEngine* CarlaEngine::newJack() { return nullptr; } | |||
| # if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
| CarlaEngine* CarlaEngine::newJuce(const AudioApi) { return nullptr; } | |||
| uint CarlaEngine::getJuceApiCount() { return 0; } | |||
| const char* CarlaEngine::getJuceApiName(const uint) { return nullptr; } | |||
| const char* const* CarlaEngine::getJuceApiDeviceNames(const uint) { return nullptr; } | |||
| const EngineDriverDeviceInfo* CarlaEngine::getJuceDeviceInfo(const uint, const char* const) { return nullptr; } | |||
| # else | |||
| CarlaEngine* CarlaEngine::newRtAudio(const AudioApi) { return nullptr; } | |||
| uint CarlaEngine::getRtAudioApiCount() { return 0; } | |||
| const char* CarlaEngine::getRtAudioApiName(const uint) { return nullptr; } | |||
| const char* const* CarlaEngine::getRtAudioApiDeviceNames(const uint) { return nullptr; } | |||
| const EngineDriverDeviceInfo* CarlaEngine::getRtAudioDeviceInfo(const uint, const char* const) { return nullptr; } | |||
| # endif | |||
| CARLA_BACKEND_END_NAMESPACE | |||
| @@ -2213,7 +1892,6 @@ CARLA_BACKEND_END_NAMESPACE | |||
| #include "CarlaPatchbayUtils.cpp" | |||
| #include "CarlaPipeUtils.cpp" | |||
| #include "CarlaStateUtils.cpp" | |||
| #include "CarlaJuceAudioProcessors.cpp" | |||
| #endif | |||
| @@ -89,30 +89,17 @@ CarlaEngineEventPort::CarlaEngineEventPort(const CarlaEngineClient& client, cons | |||
| kProcessMode(client.getEngine().getProccessMode()) | |||
| { | |||
| carla_debug("CarlaEngineEventPort::CarlaEngineEventPort(%s)", bool2str(isInputPort)); | |||
| if (kProcessMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| fBuffer = new EngineEvent[kMaxEngineEventInternalCount]; | |||
| } | |||
| CarlaEngineEventPort::~CarlaEngineEventPort() noexcept | |||
| { | |||
| carla_debug("CarlaEngineEventPort::~CarlaEngineEventPort()"); | |||
| if (kProcessMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(fBuffer != nullptr,); | |||
| delete[] fBuffer; | |||
| fBuffer = nullptr; | |||
| } | |||
| } | |||
| void CarlaEngineEventPort::initBuffer() noexcept | |||
| { | |||
| if (kProcessMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || kProcessMode == ENGINE_PROCESS_MODE_BRIDGE) | |||
| fBuffer = kClient.getEngine().getInternalEventBuffer(kIsInput); | |||
| else if (kProcessMode == ENGINE_PROCESS_MODE_PATCHBAY && ! kIsInput) | |||
| carla_zeroStructs(fBuffer, kMaxEngineEventInternalCount); | |||
| } | |||
| uint32_t CarlaEngineEventPort::getEventCount() const noexcept | |||
| @@ -196,7 +196,7 @@ public: | |||
| CARLA_SAFE_ASSERT_RETURN(clientName != nullptr && clientName[0] != '\0', false); | |||
| carla_debug("CarlaEngineRtAudio::init(\"%s\")", clientName); | |||
| if (pData->options.processMode != ENGINE_PROCESS_MODE_CONTINUOUS_RACK && pData->options.processMode != ENGINE_PROCESS_MODE_PATCHBAY) | |||
| if (pData->options.processMode != ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | |||
| { | |||
| setLastError("Invalid process mode"); | |||
| return false; | |||
| @@ -303,10 +303,7 @@ public: | |||
| return false; | |||
| } | |||
| patchbayRefresh(false); | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
| refreshExternalGraphPorts<PatchbayGraph>(pData->graph.getPatchbayGraph(), false); | |||
| patchbayRefresh(); | |||
| callback(ENGINE_CALLBACK_ENGINE_STARTED, 0, pData->options.processMode, pData->options.transportMode, 0.0f, getCurrentDriverName()); | |||
| return true; | |||
| @@ -527,25 +524,11 @@ public: | |||
| return true; | |||
| } | |||
| bool patchbayRefresh(const bool external) override | |||
| bool patchbayRefresh() override | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(pData->graph.isReady(), false); | |||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | |||
| { | |||
| return refreshExternalGraphPorts<RackGraph>(pData->graph.getRackGraph(), true); | |||
| } | |||
| else | |||
| { | |||
| pData->graph.setUsingExternal(external); | |||
| if (external) | |||
| return refreshExternalGraphPorts<PatchbayGraph>(pData->graph.getPatchbayGraph(), true); | |||
| else | |||
| return CarlaEngine::patchbayRefresh(false); | |||
| } | |||
| return false; | |||
| return refreshExternalGraphPorts<RackGraph>(pData->graph.getRackGraph(), true); | |||
| } | |||
| // ------------------------------------------------------------------- | |||
| @@ -22,15 +22,8 @@ OBJS = \ | |||
| OBJSa = $(OBJS) \ | |||
| $(OBJDIR)/CarlaEngineJack.cpp.o \ | |||
| $(OBJDIR)/CarlaEngineNative.cpp.o | |||
| ifeq ($(MACOS_OR_WIN32),true) | |||
| OBJSa += \ | |||
| $(OBJDIR)/CarlaEngineJuce.cpp.o | |||
| else | |||
| OBJSa += \ | |||
| $(OBJDIR)/CarlaEngineNative.cpp.o \ | |||
| $(OBJDIR)/CarlaEngineRtAudio.cpp.o | |||
| endif | |||
| OBJSp = $(OBJS) \ | |||
| $(OBJDIR)/CarlaEngineNative.cpp.exp.o | |||
| @@ -88,15 +88,8 @@ CarlaPlugin::CarlaPlugin(CarlaEngine* const engine, const uint id) | |||
| { | |||
| case ENGINE_PROCESS_MODE_SINGLE_CLIENT: | |||
| case ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS: | |||
| CARLA_SAFE_ASSERT(id < MAX_DEFAULT_PLUGINS); | |||
| break; | |||
| case ENGINE_PROCESS_MODE_CONTINUOUS_RACK: | |||
| CARLA_SAFE_ASSERT(id < MAX_RACK_PLUGINS); | |||
| break; | |||
| case ENGINE_PROCESS_MODE_PATCHBAY: | |||
| CARLA_SAFE_ASSERT(id < MAX_PATCHBAY_PLUGINS); | |||
| CARLA_SAFE_ASSERT(id < MAX_DEFAULT_PLUGINS); | |||
| break; | |||
| case ENGINE_PROCESS_MODE_BRIDGE: | |||
| @@ -1,40 +0,0 @@ | |||
| /* | |||
| * Carla AU Plugin | |||
| * Copyright (C) 2014 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * This program is free software; you can redistribute it and/or | |||
| * modify it under the terms of the GNU General Public License as | |||
| * published by the Free Software Foundation; either version 2 of | |||
| * the License, or any later version. | |||
| * | |||
| * This program is distributed in the hope that it will be useful, | |||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| * GNU General Public License for more details. | |||
| * | |||
| * For a full copy of the GNU General Public License see the doc/GPL.txt file. | |||
| */ | |||
| #include "CarlaPlugin.hpp" | |||
| #include "CarlaEngine.hpp" | |||
| #include "CarlaUtils.hpp" | |||
| CARLA_BACKEND_START_NAMESPACE | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| CarlaPlugin* CarlaPlugin::newAU(const Initializer& init) | |||
| { | |||
| carla_debug("CarlaPlugin::newAU({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.label, init.uniqueId); | |||
| #if defined(CARLA_OS_MAC) | |||
| return newJuce(init, "AU"); | |||
| #else | |||
| init.engine->setLastError("AU support not available"); | |||
| return nullptr; | |||
| #endif | |||
| } | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| CARLA_BACKEND_END_NAMESPACE | |||
| @@ -213,11 +213,6 @@ protected: | |||
| else | |||
| carla_setenv("ENGINE_OPTION_PLUGIN_PATH_VST2", ""); | |||
| if (options.pathVST3 != nullptr) | |||
| carla_setenv("ENGINE_OPTION_PLUGIN_PATH_VST3", options.pathVST3); | |||
| else | |||
| carla_setenv("ENGINE_OPTION_PLUGIN_PATH_VST3", ""); | |||
| if (options.pathGIG != nullptr) | |||
| carla_setenv("ENGINE_OPTION_PLUGIN_PATH_GIG", options.pathGIG); | |||
| else | |||
| @@ -853,13 +853,9 @@ public: | |||
| } | |||
| // check initial latency | |||
| #ifdef VESTIGE_HEADER | |||
| char* const empty3Ptr = &fEffect->empty3[0]; | |||
| int32_t initialDelay = *(int32_t*)empty3Ptr; | |||
| const uint32_t latency = (initialDelay > 0) ? static_cast<uint32_t>(initialDelay) : 0; | |||
| #else | |||
| const uint32_t latency = (fEffect->initialDelay > 0) ? static_cast<uint32_t>(fEffect->initialDelay) : 0; | |||
| #endif | |||
| if (latency != 0) | |||
| { | |||
| @@ -2122,11 +2118,7 @@ public: | |||
| return false; | |||
| } | |||
| #ifdef VESTIGE_HEADER | |||
| fEffect->ptr1 = this; | |||
| #else | |||
| fEffect->resvd1 = (intptr_t)this; | |||
| #endif | |||
| dispatcher(effOpen, 0, 0, nullptr, 0.0f); | |||
| @@ -2360,21 +2352,12 @@ private: | |||
| if (effect != nullptr) | |||
| { | |||
| #ifdef VESTIGE_HEADER | |||
| if (effect->ptr1 != nullptr) | |||
| { | |||
| self = (CarlaPluginVST2*)effect->ptr1; | |||
| if (self->fUnique1 != self->fUnique2) | |||
| self = nullptr; | |||
| } | |||
| #else | |||
| if (effect->resvd1 != 0) | |||
| { | |||
| self = (CarlaPluginVST2*)effect->resvd1; | |||
| if (self->fUnique1 != self->fUnique2) | |||
| self = nullptr; | |||
| } | |||
| #endif | |||
| if (self != nullptr) | |||
| { | |||
| @@ -2389,11 +2372,7 @@ private: | |||
| } | |||
| else if (sLastCarlaPluginVST2 != nullptr) | |||
| { | |||
| #ifdef VESTIGE_HEADER | |||
| effect->ptr1 = sLastCarlaPluginVST2; | |||
| #else | |||
| effect->resvd1 = (intptr_t)sLastCarlaPluginVST2; | |||
| #endif | |||
| self = sLastCarlaPluginVST2; | |||
| } | |||
| } | |||
| @@ -1,40 +0,0 @@ | |||
| /* | |||
| * Carla VST3 Plugin | |||
| * Copyright (C) 2014 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * This program is free software; you can redistribute it and/or | |||
| * modify it under the terms of the GNU General Public License as | |||
| * published by the Free Software Foundation; either version 2 of | |||
| * the License, or any later version. | |||
| * | |||
| * This program is distributed in the hope that it will be useful, | |||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| * GNU General Public License for more details. | |||
| * | |||
| * For a full copy of the GNU General Public License see the doc/GPL.txt file. | |||
| */ | |||
| #include "CarlaPlugin.hpp" | |||
| #include "CarlaEngine.hpp" | |||
| #include "CarlaUtils.hpp" | |||
| CARLA_BACKEND_START_NAMESPACE | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| CarlaPlugin* CarlaPlugin::newVST3(const Initializer& init) | |||
| { | |||
| carla_debug("CarlaPlugin::newVST3({%p, \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.uniqueId); | |||
| #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
| return newJuce(init, "VST3"); | |||
| #else | |||
| init.engine->setLastError("VST3 support not available"); | |||
| return nullptr; | |||
| #endif | |||
| } | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| CARLA_BACKEND_END_NAMESPACE | |||
| @@ -18,9 +18,6 @@ OBJS = \ | |||
| $(OBJDIR)/CarlaPluginDSSI.cpp.o \ | |||
| $(OBJDIR)/CarlaPluginLV2.cpp.o \ | |||
| $(OBJDIR)/CarlaPluginVST2.cpp.o \ | |||
| $(OBJDIR)/CarlaPluginVST3.cpp.o \ | |||
| $(OBJDIR)/CarlaPluginAU.cpp.o \ | |||
| $(OBJDIR)/CarlaPluginJuce.cpp.o \ | |||
| $(OBJDIR)/CarlaPluginFluidSynth.cpp.o \ | |||
| $(OBJDIR)/CarlaPluginLinuxSampler.cpp.o \ | |||
| $(OBJDIR)/CarlaPluginJack.cpp.o | |||
| @@ -29,15 +29,7 @@ | |||
| #include "juce_audio_basics/juce_audio_basics.h" | |||
| #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
| # include "juce_gui_basics/juce_gui_basics.h" | |||
| #else | |||
| # include "juce_events/juce_events.h" | |||
| #endif | |||
| using juce::FloatVectorOperations; | |||
| using juce::ScopedJuceInitialiser_GUI; | |||
| using juce::SharedResourcePointer; | |||
| // --------------------------------------------------------------------------------------------------------------------- | |||
| @@ -551,8 +543,6 @@ private: | |||
| } fUI; | |||
| SharedResourcePointer<ScopedJuceInitialiser_GUI> sJuceInitialiser; | |||
| // ------------------------------------------------------------------- | |||
| #define handlePtr ((CarlaEngineLV2Single*)handle) | |||
| @@ -38,22 +38,12 @@ | |||
| #include "AppConfig.h" | |||
| #include "juce_core/juce_core.h" | |||
| #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
| # include "juce_gui_basics/juce_gui_basics.h" | |||
| using juce::JUCEApplication; | |||
| using juce::JUCEApplicationBase; | |||
| using juce::Timer; | |||
| #else | |||
| # include "juce_events/juce_events.h" | |||
| #endif | |||
| using CarlaBackend::CarlaEngine; | |||
| using CarlaBackend::EngineCallbackOpcode; | |||
| using CarlaBackend::EngineCallbackOpcode2Str; | |||
| using juce::CharPointer_UTF8; | |||
| using juce::File; | |||
| using juce::ScopedJuceInitialiser_GUI; | |||
| using juce::String; | |||
| // ------------------------------------------------------------------------- | |||
| @@ -126,52 +116,6 @@ static void gIdle() | |||
| // ------------------------------------------------------------------------- | |||
| #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
| class CarlaJuceApp : public JUCEApplication, | |||
| private Timer | |||
| { | |||
| public: | |||
| CarlaJuceApp() {} | |||
| ~CarlaJuceApp() {} | |||
| void initialise(const String&) override | |||
| { | |||
| startTimer(8); | |||
| } | |||
| void shutdown() override | |||
| { | |||
| gCloseNow = true; | |||
| stopTimer(); | |||
| } | |||
| const String getApplicationName() override | |||
| { | |||
| return "CarlaPlugin"; | |||
| } | |||
| const String getApplicationVersion() override | |||
| { | |||
| return CARLA_VERSION_STRING; | |||
| } | |||
| void timerCallback() override | |||
| { | |||
| gIdle(); | |||
| if (gCloseNow) | |||
| { | |||
| quit(); | |||
| gCloseNow = false; | |||
| } | |||
| } | |||
| }; | |||
| static JUCEApplicationBase* juce_CreateApplication() { return new CarlaJuceApp(); } | |||
| #endif | |||
| // ------------------------------------------------------------------------- | |||
| class CarlaBridgePlugin | |||
| { | |||
| public: | |||
| @@ -181,7 +125,8 @@ public: | |||
| fUsingBridge(false) | |||
| { | |||
| CARLA_ASSERT(clientName != nullptr && clientName[0] != '\0'); | |||
| carla_debug("CarlaBridgePlugin::CarlaBridgePlugin(%s, \"%s\", %s, %s, %s, %s)", bool2str(useBridge), clientName, audioPoolBaseName, rtClientBaseName, nonRtClientBaseName, nonRtServerBaseName); | |||
| carla_debug("CarlaBridgePlugin::CarlaBridgePlugin(%s, \"%s\", %s, %s, %s, %s)", | |||
| bool2str(useBridge), clientName, audioPoolBaseName, rtClientBaseName, nonRtClientBaseName, nonRtServerBaseName); | |||
| carla_set_engine_callback(callback, this); | |||
| @@ -228,16 +173,11 @@ public: | |||
| gIsInitiated = true; | |||
| #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
| JUCEApplicationBase::createInstance = &juce_CreateApplication; | |||
| JUCEApplicationBase::main(JUCE_MAIN_FUNCTION_ARGS); | |||
| #else | |||
| for (; ! gCloseNow;) | |||
| { | |||
| gIdle(); | |||
| carla_msleep(8); | |||
| } | |||
| #endif | |||
| carla_set_engine_about_to_close(); | |||
| carla_remove_plugin(0); | |||
| @@ -275,8 +215,6 @@ private: | |||
| const CarlaEngine* fEngine; | |||
| bool fUsingBridge; | |||
| const ScopedJuceInitialiser_GUI kJuceInitialiser; | |||
| static void callback(void* ptr, EngineCallbackOpcode action, unsigned int pluginId, int value1, int value2, float value3, const char* valueStr) | |||
| { | |||
| carla_debug("CarlaBridgePlugin::callback(%p, %i:%s, %i, %i, %i, %f, \"%s\")", ptr, action, EngineCallbackOpcode2Str(action), pluginId, value1, value2, value3, valueStr); | |||
| @@ -26,10 +26,6 @@ BUILD_CXX_FLAGS += -DBUILD_BRIDGE -I. -I$(CWD) -I$(CWD)/backend -I$(CWD)/include | |||
| BUILD_CXX_FLAGS += -I$(CWD)/backend/engine -I$(CWD)/backend/plugin | |||
| BUILD_CXX_FLAGS += $(LIBLO_FLAGS) | |||
| ifeq ($(CARLA_VESTIGE_HEADER),true) | |||
| BUILD_CXX_FLAGS += -DVESTIGE_HEADER | |||
| endif | |||
| 32BIT_FLAGS += -DBUILD_BRIDGE_ALTERNATIVE_ARCH | |||
| 64BIT_FLAGS += -DBUILD_BRIDGE_ALTERNATIVE_ARCH | |||
| @@ -61,13 +57,6 @@ LIBS_win32 += $(MODULEDIR)/juce_core.win32.a | |||
| LIBS_win64 += $(MODULEDIR)/juce_core.win64.a | |||
| LINK_FLAGS += $(JUCE_CORE_LIBS) | |||
| LIBS_native += $(MODULEDIR)/juce_events.a | |||
| LIBS_posix32 += $(MODULEDIR)/juce_events.posix32.a | |||
| LIBS_posix64 += $(MODULEDIR)/juce_events.posix64.a | |||
| LIBS_win32 += $(MODULEDIR)/juce_events.win32.a | |||
| LIBS_win64 += $(MODULEDIR)/juce_events.win64.a | |||
| LINK_FLAGS += $(JUCE_EVENTS_LIBS) | |||
| LIBS_native += $(MODULEDIR)/lilv.a | |||
| LIBS_posix32 += $(MODULEDIR)/lilv.posix32.a | |||
| LIBS_posix64 += $(MODULEDIR)/lilv.posix64.a | |||
| @@ -82,43 +71,6 @@ LIBS_win32 += $(MODULEDIR)/rtmempool.win32.a | |||
| LIBS_win64 += $(MODULEDIR)/rtmempool.win64.a | |||
| LINK_FLAGS += $(RTMEMPOOL_LIBS) | |||
| ifeq ($(MACOS_OR_WIN32),true) | |||
| LIBS_native += $(MODULEDIR)/juce_audio_processors.a | |||
| LIBS_posix32 += $(MODULEDIR)/juce_audio_processors.posix32.a | |||
| LIBS_posix64 += $(MODULEDIR)/juce_audio_processors.posix64.a | |||
| LIBS_win32 += $(MODULEDIR)/juce_audio_processors.win32.a | |||
| LIBS_win64 += $(MODULEDIR)/juce_audio_processors.win64.a | |||
| LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS) | |||
| LIBS_native += $(MODULEDIR)/juce_data_structures.a | |||
| LIBS_posix32 += $(MODULEDIR)/juce_data_structures.posix32.a | |||
| LIBS_posix64 += $(MODULEDIR)/juce_data_structures.posix64.a | |||
| LIBS_win32 += $(MODULEDIR)/juce_data_structures.win32.a | |||
| LIBS_win64 += $(MODULEDIR)/juce_data_structures.win64.a | |||
| LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS) | |||
| LIBS_native += $(MODULEDIR)/juce_graphics.a | |||
| LIBS_posix32 += $(MODULEDIR)/juce_graphics.posix32.a | |||
| LIBS_posix64 += $(MODULEDIR)/juce_graphics.posix64.a | |||
| LIBS_win32 += $(MODULEDIR)/juce_graphics.win32.a | |||
| LIBS_win64 += $(MODULEDIR)/juce_graphics.win64.a | |||
| LINK_FLAGS += $(JUCE_GRAPHICS_LIBS) | |||
| LIBS_native += $(MODULEDIR)/juce_gui_basics.a | |||
| LIBS_posix32 += $(MODULEDIR)/juce_gui_basics.posix32.a | |||
| LIBS_posix64 += $(MODULEDIR)/juce_gui_basics.posix64.a | |||
| LIBS_win32 += $(MODULEDIR)/juce_gui_basics.win32.a | |||
| LIBS_win64 += $(MODULEDIR)/juce_gui_basics.win64.a | |||
| LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS) | |||
| ifeq ($(MACOS),true) | |||
| LIBS_native += $(MODULEDIR)/juce_gui_extra.a | |||
| LIBS_posix32 += $(MODULEDIR)/juce_gui_extra.posix32.a | |||
| LIBS_posix64 += $(MODULEDIR)/juce_gui_extra.posix64.a | |||
| LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS) | |||
| endif | |||
| endif | |||
| ifeq ($(HAVE_LIBLO),true) | |||
| LINK_FLAGS += $(LIBLO_LIBS) | |||
| endif | |||
| @@ -150,9 +102,6 @@ NATIVE_BUILD_FLAGS += $(LINUXSAMPLER_FLAGS) | |||
| NATIVE_LINK_FLAGS += $(LINUXSAMPLER_LIBS) | |||
| endif | |||
| LIBS_native += $(MODULEDIR)/juce_audio_formats.a | |||
| NATIVE_LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS) | |||
| LIBS_native += $(MODULEDIR)/native-plugins.a | |||
| NATIVE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS) | |||
| @@ -183,9 +132,6 @@ OBJS_native = \ | |||
| $(OBJDIR)/CarlaPluginDSSI.cpp.o \ | |||
| $(OBJDIR)/CarlaPluginLV2.cpp.o \ | |||
| $(OBJDIR)/CarlaPluginVST2.cpp.o \ | |||
| $(OBJDIR)/CarlaPluginVST3.cpp.o \ | |||
| $(OBJDIR)/CarlaPluginAU.cpp.o \ | |||
| $(OBJDIR)/CarlaPluginJuce.cpp.o \ | |||
| $(OBJDIR)/CarlaPluginFluidSynth.cpp.o \ | |||
| $(OBJDIR)/CarlaPluginLinuxSampler.cpp.o \ | |||
| $(OBJDIR)/CarlaStandalone.cpp.o | |||
| @@ -213,9 +159,6 @@ OBJS_arch = \ | |||
| $(OBJDIR)/CarlaPluginDSSI.cpp.arch.o \ | |||
| $(OBJDIR)/CarlaPluginLV2.cpp.arch.o \ | |||
| $(OBJDIR)/CarlaPluginVST2.cpp.arch.o \ | |||
| $(OBJDIR)/CarlaPluginVST3.cpp.arch.o \ | |||
| $(OBJDIR)/CarlaPluginAU.cpp.arch.o \ | |||
| $(OBJDIR)/CarlaPluginJuce.cpp.arch.o \ | |||
| $(OBJDIR)/CarlaStandalone.cpp.arch.o | |||
| OBJS_posix32 = $(OBJS_arch:%.arch.o=%.posix32.o) | |||
| @@ -51,7 +51,7 @@ if __name__ == '__main__': | |||
| # Init host backend | |||
| host = initHost(initName, libPrefix, True, False, True, CarlaHostOSC) | |||
| host.processMode = ENGINE_PROCESS_MODE_PATCHBAY | |||
| host.processMode = ENGINE_PROCESS_MODE_BRIDGE | |||
| host.processModeForced = True | |||
| loadHostSettings(host) | |||
| @@ -1,64 +0,0 @@ | |||
| #!/usr/bin/env python3 | |||
| # -*- coding: utf-8 -*- | |||
| # Carla plugin host | |||
| # Copyright (C) 2011-2017 Filipe Coelho <falktx@falktx.com> | |||
| # | |||
| # This program is free software; you can redistribute it and/or | |||
| # modify it under the terms of the GNU General Public License as | |||
| # published by the Free Software Foundation; either version 2 of | |||
| # the License, or any later version. | |||
| # | |||
| # This program is distributed in the hope that it will be useful, | |||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| # GNU General Public License for more details. | |||
| # | |||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | |||
| # ---------------------------------------------------------------------------------------------------------------------- | |||
| # Imports (Custom Stuff) | |||
| from carla_host import * | |||
| # ---------------------------------------------------------------------------------------------------------------------- | |||
| # Main | |||
| if __name__ == '__main__': | |||
| # ------------------------------------------------------------------------------------------------------------------ | |||
| # Read CLI args | |||
| initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None) | |||
| # ------------------------------------------------------------------------------------------------------------------ | |||
| # App initialization | |||
| app = CarlaApplication("Carla2-Patchbay", libPrefix) | |||
| # ------------------------------------------------------------------------------------------------------------------ | |||
| # Set-up custom signal handling | |||
| setUpSignals() | |||
| # ------------------------------------------------------------------------------------------------------------------ | |||
| # Init host backend | |||
| host = initHost(initName, libPrefix, False, False, True) | |||
| host.processMode = ENGINE_PROCESS_MODE_PATCHBAY | |||
| host.processModeForced = True | |||
| loadHostSettings(host) | |||
| # ------------------------------------------------------------------------------------------------------------------ | |||
| # Create GUI | |||
| gui = HostWindow(host, True) | |||
| # ------------------------------------------------------------------------------------------------------------------ | |||
| # Show GUI | |||
| gui.show() | |||
| # ------------------------------------------------------------------------------------------------------------------ | |||
| # App-Loop | |||
| app.exit_exec() | |||
| @@ -56,8 +56,7 @@ SOURCES = \ | |||
| backend/plugin/CarlaPluginLinuxSampler.cpp \ | |||
| backend/plugin/CarlaPluginLV2.cpp \ | |||
| backend/plugin/CarlaPluginNative.cpp \ | |||
| backend/plugin/CarlaPluginVST2.cpp \ | |||
| backend/plugin/CarlaPluginVST3.cpp | |||
| backend/plugin/CarlaPluginVST2.cpp | |||
| HEADERS = \ | |||
| # C API | |||
| @@ -144,12 +144,6 @@ def structToDict(struct): | |||
| # Maximum default number of loadable plugins. | |||
| MAX_DEFAULT_PLUGINS = 99 | |||
| # Maximum number of loadable plugins in rack mode. | |||
| MAX_RACK_PLUGINS = 16 | |||
| # Maximum number of loadable plugins in patchbay mode. | |||
| MAX_PATCHBAY_PLUGINS = 255 | |||
| # Maximum default number of parameters allowed. | |||
| # @see ENGINE_OPTION_MAX_PARAMETERS | |||
| MAX_DEFAULT_PARAMETERS = 200 | |||
| @@ -387,24 +381,17 @@ PLUGIN_LV2 = 4 | |||
| # VST2 plugin. | |||
| PLUGIN_VST2 = 5 | |||
| # VST3 plugin. | |||
| PLUGIN_VST3 = 6 | |||
| # AU plugin. | |||
| # @note MacOS only | |||
| PLUGIN_AU = 7 | |||
| # GIG file. | |||
| PLUGIN_GIG = 8 | |||
| PLUGIN_GIG = 6 | |||
| # SF2 file (SoundFont). | |||
| PLUGIN_SF2 = 9 | |||
| PLUGIN_SF2 = 7 | |||
| # SFZ file. | |||
| PLUGIN_SFZ = 10 | |||
| PLUGIN_SFZ = 8 | |||
| # JACK application. | |||
| PLUGIN_JACK = 11 | |||
| PLUGIN_JACK = 9 | |||
| # ------------------------------------------------------------------------------------------------------------ | |||
| # Plugin Category | |||
| @@ -717,7 +704,7 @@ ENGINE_CALLBACK_QUIT = 40 | |||
| ENGINE_OPTION_DEBUG = 0 | |||
| # Set the engine processing mode. | |||
| # Default is ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS on Linux and ENGINE_PROCESS_MODE_PATCHBAY for all other OSes. | |||
| # Default is ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS on Linux and ENGINE_PROCESS_MODE_CONTINUOUS_RACK for all other OSes. | |||
| # @see EngineProcessMode | |||
| ENGINE_OPTION_PROCESS_MODE = 1 | |||
| @@ -828,11 +815,8 @@ ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS = 1 | |||
| # Processes plugins in order of Id, with forced stereo always on. | |||
| ENGINE_PROCESS_MODE_CONTINUOUS_RACK = 2 | |||
| # Single client, 'patchbay' mode. | |||
| ENGINE_PROCESS_MODE_PATCHBAY = 3 | |||
| # Special mode, used in plugin-bridges only. | |||
| ENGINE_PROCESS_MODE_BRIDGE = 4 | |||
| ENGINE_PROCESS_MODE_BRIDGE = 3 | |||
| # ------------------------------------------------------------------------------------------------------------ | |||
| # Engine Transport Mode | |||
| @@ -1245,9 +1229,9 @@ class CarlaHostMeta(object): | |||
| self.nsmOK = False | |||
| # settings | |||
| self.processMode = ENGINE_PROCESS_MODE_PATCHBAY | |||
| self.processMode = ENGINE_PROCESS_MODE_CONTINUOUS_RACK | |||
| self.transportMode = ENGINE_TRANSPORT_MODE_INTERNAL | |||
| self.nextProcessMode = ENGINE_PROCESS_MODE_PATCHBAY | |||
| self.nextProcessMode = self.processMode | |||
| self.processModeForced = False | |||
| self.audioDriverForced = None | |||
| @@ -1388,7 +1372,7 @@ class CarlaHostMeta(object): | |||
| # @param external Wherever to show external/hardware ports instead of internal ones. | |||
| # Only valid in patchbay engine mode, other modes will ignore this. | |||
| @abstractmethod | |||
| def patchbay_refresh(self, external): | |||
| def patchbay_refresh(self): | |||
| raise NotImplementedError | |||
| # Start playback of the engine transport. | |||
| @@ -1942,7 +1926,7 @@ class CarlaHostNull(CarlaHostMeta): | |||
| def patchbay_disconnect(self, connectionId): | |||
| return False | |||
| def patchbay_refresh(self, external): | |||
| def patchbay_refresh(self): | |||
| return False | |||
| def transport_play(self): | |||
| @@ -2224,7 +2208,7 @@ class CarlaHostDLL(CarlaHostMeta): | |||
| self.lib.carla_patchbay_disconnect.argtypes = [c_uint] | |||
| self.lib.carla_patchbay_disconnect.restype = c_bool | |||
| self.lib.carla_patchbay_refresh.argtypes = [c_bool] | |||
| self.lib.carla_patchbay_refresh.argtypes = None | |||
| self.lib.carla_patchbay_refresh.restype = c_bool | |||
| self.lib.carla_transport_play.argtypes = None | |||
| @@ -2498,8 +2482,8 @@ class CarlaHostDLL(CarlaHostMeta): | |||
| def patchbay_disconnect(self, connectionId): | |||
| return bool(self.lib.carla_patchbay_disconnect(connectionId)) | |||
| def patchbay_refresh(self, external): | |||
| return bool(self.lib.carla_patchbay_refresh(external)) | |||
| def patchbay_refresh(self): | |||
| return bool(self.lib.carla_patchbay_refresh()) | |||
| def transport_play(self): | |||
| self.lib.carla_transport_play() | |||
| @@ -2835,8 +2819,7 @@ class CarlaHostPlugin(CarlaHostMeta): | |||
| def patchbay_disconnect(self, connectionId): | |||
| return self.sendMsgAndSetError(["patchbay_disconnect", connectionId]) | |||
| def patchbay_refresh(self, external): | |||
| # don't send external param, never used in plugins | |||
| def patchbay_refresh(self): | |||
| return self.sendMsgAndSetError(["patchbay_refresh"]) | |||
| def transport_play(self): | |||
| @@ -89,15 +89,6 @@ def findBinaries(binPath, OS): | |||
| return binaries | |||
| def findVST3Binaries(binPath): | |||
| binaries = [] | |||
| for root, dirs, files in os.walk(binPath): | |||
| for name in [name for name in files if name.lower().endswith(".vst3")]: | |||
| binaries.append(os.path.join(root, name)) | |||
| return binaries | |||
| def findLV2Bundles(bundlePath): | |||
| bundles = [] | |||
| @@ -108,12 +99,12 @@ def findLV2Bundles(bundlePath): | |||
| return bundles | |||
| def findMacVSTBundles(bundlePath, isVST3): | |||
| def findMacVSTBundles(bundlePath): | |||
| bundles = [] | |||
| for root, dirs, files in os.walk(bundlePath, followlinks=True): | |||
| #if root == bundlePath: continue # FIXME | |||
| for name in [name for name in dirs if name.lower().endswith(".vst3" if isVST3 else ".vst")]: | |||
| for name in [name for name in dirs if name.lower().endswith(".vst")]: | |||
| bundles.append(os.path.join(root, name)) | |||
| return bundles | |||
| @@ -354,12 +345,6 @@ def checkPluginLV2(filename, tool, wineSettings=None): | |||
| def checkPluginVST2(filename, tool, wineSettings=None): | |||
| return runCarlaDiscovery(PLUGIN_VST2, "VST2", filename, tool, wineSettings) | |||
| def checkPluginVST3(filename, tool, wineSettings=None): | |||
| return runCarlaDiscovery(PLUGIN_VST3, "VST3", filename, tool, wineSettings) | |||
| def checkPluginAU(tool): | |||
| return runCarlaDiscovery(None, PLUGIN_AU, "AU", ":all", tool) | |||
| def checkFileGIG(filename, tool): | |||
| return runCarlaDiscovery(None, PLUGIN_GIG, "GIG", filename, tool) | |||
| @@ -391,7 +376,6 @@ class SearchPluginsThread(QThread): | |||
| self.fCheckDSSI = False | |||
| self.fCheckLV2 = False | |||
| self.fCheckVST2 = False | |||
| self.fCheckVST3 = False | |||
| self.fCheckAU = False | |||
| self.fCheckGIG = False | |||
| self.fCheckSF2 = False | |||
| @@ -426,7 +410,6 @@ class SearchPluginsThread(QThread): | |||
| self.fDssiPlugins = [] | |||
| self.fLv2Plugins = [] | |||
| self.fVst2Plugins = [] | |||
| self.fVst3Plugins = [] | |||
| self.fAuPlugins = [] | |||
| self.fKitPlugins = [] | |||
| @@ -442,13 +425,11 @@ class SearchPluginsThread(QThread): | |||
| self.fCheckWin32 = win32 | |||
| self.fCheckWin64 = win64 | |||
| def setSearchPluginTypes(self, ladspa, dssi, lv2, vst2, vst3, au, gig, sf2, sfz): | |||
| def setSearchPluginTypes(self, ladspa, dssi, lv2, vst2, gig, sf2, sfz): | |||
| self.fCheckLADSPA = ladspa | |||
| self.fCheckDSSI = dssi | |||
| self.fCheckLV2 = lv2 | |||
| self.fCheckVST2 = vst2 | |||
| self.fCheckVST3 = vst3 and (MACOS or WINDOWS) | |||
| self.fCheckAU = au and MACOS | |||
| self.fCheckGIG = gig | |||
| self.fCheckSF2 = sf2 | |||
| self.fCheckSFZ = sfz | |||
| @@ -468,26 +449,16 @@ class SearchPluginsThread(QThread): | |||
| if self.fCheckLADSPA: pluginCount += 1 | |||
| if self.fCheckDSSI: pluginCount += 1 | |||
| if self.fCheckVST2: pluginCount += 1 | |||
| if self.fCheckVST3: pluginCount += 1 | |||
| # Increase count by the number of externally discoverable plugin types | |||
| if self.fCheckNative: | |||
| self.fCurCount += pluginCount | |||
| # MacOS and Windows are the only VST3 supported OSes | |||
| if self.fCheckVST3 and not (MACOS or WINDOWS): | |||
| self.fCurCount -= 1 | |||
| if self.fCheckPosix32: | |||
| self.fCurCount += pluginCount | |||
| # MacOS is the only VST3 supported posix OS | |||
| if self.fCheckVST3 and not MACOS: | |||
| self.fCurCount -= 1 | |||
| if self.fCheckPosix64: | |||
| self.fCurCount += pluginCount | |||
| # MacOS is the only VST3 supported posix OS | |||
| if self.fCheckVST3 and not MACOS: | |||
| self.fCurCount -= 1 | |||
| if self.fCheckWin32: | |||
| self.fCurCount += pluginCount | |||
| @@ -626,7 +597,7 @@ class SearchPluginsThread(QThread): | |||
| if not self.fContinueChecking: return | |||
| if self.fCheckLV2: | |||
| self._checkCached(True) | |||
| self._checkLv2Cached() | |||
| settingsDB.setValue("Plugins/LV2", self.fLv2Plugins) | |||
| if not self.fContinueChecking: return | |||
| @@ -659,45 +630,6 @@ class SearchPluginsThread(QThread): | |||
| settingsDB.sync() | |||
| if not self.fContinueChecking: return | |||
| if self.fCheckVST3: | |||
| if self.fCheckNative and (MACOS or WINDOWS): | |||
| self._checkVST3(self.fToolNative) | |||
| settingsDB.setValue("Plugins/VST3_native", self.fVst3Plugins) | |||
| if not self.fContinueChecking: return | |||
| if self.fCheckPosix32 and MACOS: | |||
| self._checkVST3(os.path.join(self.fPathBinaries, "carla-discovery-posix32")) | |||
| settingsDB.setValue("Plugins/VST3_posix32", self.fVst3Plugins) | |||
| if not self.fContinueChecking: return | |||
| if self.fCheckPosix64 and MACOS: | |||
| self._checkVST3(os.path.join(self.fPathBinaries, "carla-discovery-posix64")) | |||
| settingsDB.setValue("Plugins/VST3_posix64", self.fVst3Plugins) | |||
| if not self.fContinueChecking: return | |||
| if self.fCheckWin32: | |||
| self._checkVST3(os.path.join(self.fPathBinaries, "carla-discovery-win32.exe"), not WINDOWS) | |||
| settingsDB.setValue("Plugins/VST3_win32", self.fVst3Plugins) | |||
| if not self.fContinueChecking: return | |||
| if self.fCheckWin64: | |||
| self._checkVST3(os.path.join(self.fPathBinaries, "carla-discovery-win64.exe"), not WINDOWS) | |||
| settingsDB.setValue("Plugins/VST3_win64", self.fVst3Plugins) | |||
| settingsDB.sync() | |||
| if not self.fContinueChecking: return | |||
| if self.fCheckAU: | |||
| if self.fCheckNative: | |||
| self._checkCached(True) | |||
| settingsDB.setValue("Plugins/AU", self.fAuPlugins) | |||
| if not self.fContinueChecking: return | |||
| if self.fCheckPosix32: | |||
| self._checkAU(os.path.join(self.fPathBinaries, "carla-discovery-posix32")) | |||
| settingsDB.setValue("Plugins/AU_posix32", self.fAuPlugins) | |||
| if not self.fContinueChecking: return | |||
| if self.fCheckGIG: | |||
| settings = QSettings("falkTX", "Carla2") | |||
| GIG_PATH = toList(settings.value(CARLA_KEY_PATHS_GIG, CARLA_DEFAULT_GIG_PATH)) | |||
| @@ -831,54 +763,6 @@ class SearchPluginsThread(QThread): | |||
| self.fLastCheckValue += self.fCurPercentValue | |||
| def _checkVST3(self, tool, isWine=False): | |||
| vst3Binaries = [] | |||
| self.fVst3Plugins = [] | |||
| if MACOS and not isWine: | |||
| self._pluginLook(self.fLastCheckValue, "VST3 bundles...") | |||
| else: | |||
| self._pluginLook(self.fLastCheckValue, "VST3 plugins...") | |||
| settings = QSettings("falkTX", "Carla2") | |||
| VST3_PATH = toList(settings.value(CARLA_KEY_PATHS_VST3, CARLA_DEFAULT_VST3_PATH)) | |||
| del settings | |||
| for iPATH in VST3_PATH: | |||
| if MACOS and not isWine: | |||
| binaries = findMacVSTBundles(iPATH, True) | |||
| else: | |||
| binaries = findVST3Binaries(iPATH) | |||
| for binary in binaries: | |||
| if binary not in vst3Binaries: | |||
| vst3Binaries.append(binary) | |||
| vst3Binaries.sort() | |||
| if not self.fContinueChecking: return | |||
| for i in range(len(vst3Binaries)): | |||
| vst3 = vst3Binaries[i] | |||
| percent = ( float(i) / len(vst3Binaries) ) * self.fCurPercentValue | |||
| self._pluginLook(self.fLastCheckValue + percent, vst3) | |||
| plugins = checkPluginVST3(vst3, tool, self.fWineSettings if isWine else None) | |||
| if plugins: | |||
| self.fVst3Plugins.append(plugins) | |||
| if not self.fContinueChecking: break | |||
| self.fLastCheckValue += self.fCurPercentValue | |||
| def _checkAU(self, tool): | |||
| self.fAuPlugins = [] | |||
| plugins = checkPluginAU(tool) | |||
| if plugins: | |||
| self.fAuPlugins.append(plugins) | |||
| self.fLastCheckValue += self.fCurPercentValue | |||
| def _checkKIT(self, kitPATH, kitExtension): | |||
| kitFiles = [] | |||
| self.fKitPlugins = [] | |||
| @@ -914,35 +798,27 @@ class SearchPluginsThread(QThread): | |||
| self.fLastCheckValue += self.fCurPercentValue | |||
| def _checkCached(self, isLV2): | |||
| if isLV2: | |||
| settings = QSettings("falkTX", "Carla2") | |||
| PLUG_PATH = splitter.join(toList(settings.value(CARLA_KEY_PATHS_LV2, CARLA_DEFAULT_LV2_PATH))) | |||
| del settings | |||
| PLUG_TEXT = "LV2" | |||
| PLUG_TYPE = PLUGIN_LV2 | |||
| self.fLv2Plugins = [] | |||
| PLUG_LIST = self.fLv2Plugins | |||
| else: | |||
| PLUG_PATH = "" | |||
| PLUG_TEXT = "AU" | |||
| PLUG_TYPE = PLUGIN_AU | |||
| self.fAuPlugins = [] | |||
| PLUG_LIST = self.fAuPlugins | |||
| def _checkLv2Cached(self): | |||
| settings = QSettings("falkTX", "Carla2") | |||
| PLUG_PATH = splitter.join(toList(settings.value(CARLA_KEY_PATHS_LV2, CARLA_DEFAULT_LV2_PATH))) | |||
| del settings | |||
| self.fLv2Plugins = [] | |||
| PLUG_LIST = self.fLv2Plugins | |||
| self._pluginLook(self.fLastCheckValue, "%s plugins..." % PLUG_TEXT) | |||
| self._pluginLook(self.fLastCheckValue, "LV2 plugins...") | |||
| count = gCarla.utils.get_cached_plugin_count(PLUG_TYPE, PLUG_PATH) | |||
| count = gCarla.utils.get_cached_plugin_count(PLUGIN_LV2, PLUG_PATH) | |||
| if not self.fContinueChecking: return | |||
| for i in range(count): | |||
| descInfo = gCarla.utils.get_cached_plugin_info(PLUG_TYPE, i) | |||
| descInfo = gCarla.utils.get_cached_plugin_info(PLUGIN_LV2, i) | |||
| percent = ( float(i) / count ) * self.fCurPercentValue | |||
| self._pluginLook(self.fLastCheckValue + percent, descInfo['label']) | |||
| plugins = checkPluginCached(descInfo, PLUG_TYPE) | |||
| plugins = checkPluginCached(descInfo, PLUGIN_LV2) | |||
| if plugins: | |||
| PLUG_LIST.append(plugins) | |||
| @@ -1054,14 +930,6 @@ class PluginRefreshW(QDialog): | |||
| self.ui.ico_posix32.setVisible(False) | |||
| self.ui.label_posix32.setVisible(False) | |||
| if not MACOS: | |||
| self.ui.ch_au.setEnabled(False) | |||
| self.ui.ch_au.setVisible(False) | |||
| if not (hasWin32 or hasWin64): | |||
| self.ui.ch_vst3.setEnabled(False) | |||
| self.ui.ch_vst3.setVisible(False) | |||
| if hasNative: | |||
| self.ui.ico_native.setPixmap(self.fIconYes) | |||
| else: | |||
| @@ -1074,7 +942,6 @@ class PluginRefreshW(QDialog): | |||
| self.ui.ch_ladspa.setEnabled(False) | |||
| self.ui.ch_dssi.setEnabled(False) | |||
| self.ui.ch_vst.setEnabled(False) | |||
| self.ui.ch_vst3.setEnabled(False) | |||
| # -------------------------------------------------------------------------------------------------------------- | |||
| # Load settings | |||
| @@ -1142,8 +1009,6 @@ class PluginRefreshW(QDialog): | |||
| self.ui.ch_dssi.clicked.connect(self.slot_checkTools) | |||
| self.ui.ch_lv2.clicked.connect(self.slot_checkTools) | |||
| self.ui.ch_vst.clicked.connect(self.slot_checkTools) | |||
| self.ui.ch_vst3.clicked.connect(self.slot_checkTools) | |||
| self.ui.ch_au.clicked.connect(self.slot_checkTools) | |||
| self.ui.ch_gig.clicked.connect(self.slot_checkTools) | |||
| self.ui.ch_sf2.clicked.connect(self.slot_checkTools) | |||
| self.ui.ch_sfz.clicked.connect(self.slot_checkTools) | |||
| @@ -1172,18 +1037,6 @@ class PluginRefreshW(QDialog): | |||
| check = settings.value("PluginDatabase/SearchVST2", True, type=bool) and self.ui.ch_vst.isEnabled() | |||
| self.ui.ch_vst.setChecked(check) | |||
| if MACOS or WINDOWS: | |||
| check = settings.value("PluginDatabase/SearchVST3", True, type=bool) and self.ui.ch_vst3.isEnabled() | |||
| else: | |||
| check = False | |||
| self.ui.ch_vst3.setChecked(check) | |||
| if MACOS: | |||
| check = settings.value("PluginDatabase/SearchAU", True, type=bool) and self.ui.ch_au.isEnabled() | |||
| else: | |||
| check = False | |||
| self.ui.ch_au.setChecked(check) | |||
| check = settings.value("PluginDatabase/SearchGIG", False, type=bool) and self.ui.ch_gig.isEnabled() | |||
| self.ui.ch_gig.setChecked(check) | |||
| @@ -1219,8 +1072,6 @@ class PluginRefreshW(QDialog): | |||
| settings.setValue("PluginDatabase/SearchDSSI", self.ui.ch_dssi.isChecked()) | |||
| settings.setValue("PluginDatabase/SearchLV2", self.ui.ch_lv2.isChecked()) | |||
| settings.setValue("PluginDatabase/SearchVST2", self.ui.ch_vst.isChecked()) | |||
| settings.setValue("PluginDatabase/SearchVST3", self.ui.ch_vst3.isChecked()) | |||
| settings.setValue("PluginDatabase/SearchAU", self.ui.ch_au.isChecked()) | |||
| settings.setValue("PluginDatabase/SearchGIG", self.ui.ch_gig.isChecked()) | |||
| settings.setValue("PluginDatabase/SearchSF2", self.ui.ch_sf2.isChecked()) | |||
| settings.setValue("PluginDatabase/SearchSFZ", self.ui.ch_sfz.isChecked()) | |||
| @@ -1253,14 +1104,13 @@ class PluginRefreshW(QDialog): | |||
| self.ui.ch_posix32.isChecked(), self.ui.ch_posix64.isChecked(), | |||
| self.ui.ch_win32.isChecked(), self.ui.ch_win64.isChecked()) | |||
| ladspa, dssi, lv2, vst, vst3, au, gig, sf2, sfz = (self.ui.ch_ladspa.isChecked(), self.ui.ch_dssi.isChecked(), | |||
| self.ui.ch_lv2.isChecked(), self.ui.ch_vst.isChecked(), | |||
| self.ui.ch_vst3.isChecked(), self.ui.ch_au.isChecked(), | |||
| self.ui.ch_gig.isChecked(), self.ui.ch_sf2.isChecked(), | |||
| self.ui.ch_sfz.isChecked()) | |||
| ladspa, dssi, lv2, vst, gig, sf2, sfz = (self.ui.ch_ladspa.isChecked(), self.ui.ch_dssi.isChecked(), | |||
| self.ui.ch_lv2.isChecked(), self.ui.ch_vst.isChecked(), | |||
| self.ui.ch_gig.isChecked(), self.ui.ch_sf2.isChecked(), | |||
| self.ui.ch_sfz.isChecked()) | |||
| self.fThread.setSearchBinaryTypes(native, posix32, posix64, win32, win64) | |||
| self.fThread.setSearchPluginTypes(ladspa, dssi, lv2, vst, vst3, au, gig, sf2, sfz) | |||
| self.fThread.setSearchPluginTypes(ladspa, dssi, lv2, vst, gig, sf2, sfz) | |||
| self.fThread.start() | |||
| # ------------------------------------------------------------------------------------------------------------------ | |||
| @@ -1277,8 +1127,8 @@ class PluginRefreshW(QDialog): | |||
| self.ui.ch_posix32.isChecked() or self.ui.ch_posix64.isChecked() or | |||
| self.ui.ch_win32.isChecked() or self.ui.ch_win64.isChecked()) | |||
| enabled2 = bool(self.ui.ch_ladspa.isChecked() or self.ui.ch_dssi.isChecked() or self.ui.ch_lv2.isChecked() or | |||
| self.ui.ch_vst.isChecked() or self.ui.ch_vst3.isChecked() or self.ui.ch_au.isChecked() or | |||
| enabled2 = bool(self.ui.ch_ladspa.isChecked() or self.ui.ch_dssi.isChecked() or | |||
| self.ui.ch_lv2.isChecked() or self.ui.ch_vst.isChecked() or | |||
| self.ui.ch_gig.isChecked() or self.ui.ch_sf2.isChecked() or self.ui.ch_sfz.isChecked()) | |||
| self.ui.b_start.setEnabled(enabled1 and enabled2) | |||
| @@ -1408,8 +1258,6 @@ class PluginDatabaseW(QDialog): | |||
| self.ui.ch_dssi.clicked.connect(self.slot_checkFilters) | |||
| self.ui.ch_lv2.clicked.connect(self.slot_checkFilters) | |||
| self.ui.ch_vst.clicked.connect(self.slot_checkFilters) | |||
| self.ui.ch_vst3.clicked.connect(self.slot_checkFilters) | |||
| self.ui.ch_au.clicked.connect(self.slot_checkFilters) | |||
| self.ui.ch_kits.clicked.connect(self.slot_checkFilters) | |||
| self.ui.ch_native.clicked.connect(self.slot_checkFilters) | |||
| self.ui.ch_bridged.clicked.connect(self.slot_checkFilters) | |||
| @@ -1470,8 +1318,6 @@ class PluginDatabaseW(QDialog): | |||
| settings.setValue("PluginDatabase/ShowDSSI", self.ui.ch_dssi.isChecked()) | |||
| settings.setValue("PluginDatabase/ShowLV2", self.ui.ch_lv2.isChecked()) | |||
| settings.setValue("PluginDatabase/ShowVST2", self.ui.ch_vst.isChecked()) | |||
| settings.setValue("PluginDatabase/ShowVST3", self.ui.ch_vst3.isChecked()) | |||
| settings.setValue("PluginDatabase/ShowAU", self.ui.ch_au.isChecked()) | |||
| settings.setValue("PluginDatabase/ShowKits", self.ui.ch_kits.isChecked()) | |||
| settings.setValue("PluginDatabase/ShowNative", self.ui.ch_native.isChecked()) | |||
| settings.setValue("PluginDatabase/ShowBridged", self.ui.ch_bridged.isChecked()) | |||
| @@ -1495,8 +1341,6 @@ class PluginDatabaseW(QDialog): | |||
| self.ui.ch_dssi.setChecked(settings.value("PluginDatabase/ShowDSSI", True, type=bool)) | |||
| self.ui.ch_lv2.setChecked(settings.value("PluginDatabase/ShowLV2", True, type=bool)) | |||
| self.ui.ch_vst.setChecked(settings.value("PluginDatabase/ShowVST2", True, type=bool)) | |||
| self.ui.ch_vst3.setChecked(settings.value("PluginDatabase/ShowVST3", (MACOS or WINDOWS), type=bool)) | |||
| self.ui.ch_au.setChecked(settings.value("PluginDatabase/ShowAU", True, type=bool)) | |||
| self.ui.ch_kits.setChecked(settings.value("PluginDatabase/ShowKits", True, type=bool)) | |||
| self.ui.ch_native.setChecked(settings.value("PluginDatabase/ShowNative", True, type=bool)) | |||
| self.ui.ch_bridged.setChecked(settings.value("PluginDatabase/ShowBridged", True, type=bool)) | |||
| @@ -1529,8 +1373,6 @@ class PluginDatabaseW(QDialog): | |||
| hideDssi = not self.ui.ch_dssi.isChecked() | |||
| hideLV2 = not self.ui.ch_lv2.isChecked() | |||
| hideVST2 = not self.ui.ch_vst.isChecked() | |||
| hideVST3 = not self.ui.ch_vst3.isChecked() | |||
| hideAU = not self.ui.ch_au.isChecked() | |||
| hideKits = not self.ui.ch_kits.isChecked() | |||
| hideNative = not self.ui.ch_native.isChecked() | |||
| @@ -1595,10 +1437,6 @@ class PluginDatabaseW(QDialog): | |||
| self.ui.tableWidget.hideRow(i) | |||
| elif hideVST2 and ptype == "VST2": | |||
| self.ui.tableWidget.hideRow(i) | |||
| elif hideVST3 and ptype == "VST3": | |||
| self.ui.tableWidget.hideRow(i) | |||
| elif hideAU and ptype == "AU": | |||
| self.ui.tableWidget.hideRow(i) | |||
| elif hideNative and isNative: | |||
| self.ui.tableWidget.hideRow(i) | |||
| elif hideBridged and isBridged: | |||
| @@ -1695,8 +1533,6 @@ class PluginDatabaseW(QDialog): | |||
| dssiCount = 0 | |||
| lv2Count = 0 | |||
| vstCount = 0 | |||
| vst3Count = 0 | |||
| auCount = 0 | |||
| kitCount = 0 | |||
| settings = QSettings("falkTX", "Carla2") | |||
| @@ -1767,39 +1603,6 @@ class PluginDatabaseW(QDialog): | |||
| del lv2CountNew | |||
| del lv2Plugins | |||
| # ---------------------------------------------------------------------------------------------------- | |||
| # Cached plugins (AU) | |||
| if MACOS: | |||
| auPlugins = toList(settingsDB.value("Plugins/AU", [])) | |||
| for plugins in auPlugins: | |||
| auCount += len(plugins) | |||
| auCountNew = gCarla.utils.get_cached_plugin_count(PLUGIN_AU, "") | |||
| if auCountNew != auCount or (len(auPlugins) > 0 and | |||
| len(auPlugins[0]) > 0 and | |||
| auPlugins[0][0]['API'] != PLUGIN_QUERY_API_VERSION): | |||
| auCount = auCountNew | |||
| auPlugins = [] | |||
| for i in range(auCountNew): | |||
| descInfo = gCarla.utils.get_cached_plugin_info(PLUGIN_AU, i) | |||
| plugins = checkPluginCached(descInfo, PLUGIN_AU) | |||
| if plugins: | |||
| auPlugins.append(plugins) | |||
| settingsDB.setValue("Plugins/AU", auPlugins) | |||
| for plugins in auPlugins: | |||
| for plugin in plugins: | |||
| self._addPluginToTable(plugin, "AU") | |||
| del auCountNew | |||
| del auPlugins | |||
| # ---------------------------------------------------------------------------------------------------- | |||
| # LADSPA | |||
| @@ -1851,36 +1654,6 @@ class PluginDatabaseW(QDialog): | |||
| del vst2Plugins | |||
| # ---------------------------------------------------------------------------------------------------- | |||
| # VST3 | |||
| vst3Plugins = [] | |||
| vst3Plugins += toList(settingsDB.value("Plugins/VST3_native", [])) | |||
| vst3Plugins += toList(settingsDB.value("Plugins/VST3_posix32", [])) | |||
| vst3Plugins += toList(settingsDB.value("Plugins/VST3_posix64", [])) | |||
| vst3Plugins += toList(settingsDB.value("Plugins/VST3_win32", [])) | |||
| vst3Plugins += toList(settingsDB.value("Plugins/VST3_win64", [])) | |||
| for plugins in vst3Plugins: | |||
| for plugin in plugins: | |||
| self._addPluginToTable(plugin, "VST3") | |||
| vst3Count += 1 | |||
| del vst3Plugins | |||
| # ---------------------------------------------------------------------------------------------------- | |||
| # AU (extra non-cached) | |||
| if MACOS: | |||
| auPlugins = toList(settingsDB.value("Plugins/AU_posix32", [])) | |||
| for plugins in auPlugins: | |||
| for plugin in plugins: | |||
| self._addPluginToTable(plugin, "AU") | |||
| auCount += 1 | |||
| del auPlugins | |||
| # ---------------------------------------------------------------------------------------------------- | |||
| # Kits | |||
| @@ -1919,12 +1692,8 @@ class PluginDatabaseW(QDialog): | |||
| self.ui.tableWidget.setSortingEnabled(True) | |||
| if MACOS: | |||
| self.ui.label.setText(self.tr("Have %i Internal, %i LADSPA, %i DSSI, %i LV2, %i VST, %i VST3 and %i AudioUnit plugins, plus %i Sound Kits" % ( | |||
| internalCount, ladspaCount, dssiCount, lv2Count, vstCount, vst3Count, auCount, kitCount))) | |||
| else: | |||
| self.ui.label.setText(self.tr("Have %i Internal, %i LADSPA, %i DSSI, %i LV2, %i VST and %i VST3 plugins, plus %i Sound Kits" % ( | |||
| internalCount, ladspaCount, dssiCount, lv2Count, vstCount, vst3Count, kitCount))) | |||
| self.ui.label.setText(self.tr("Have %i Internal, %i LADSPA, %i DSSI, %i LV2 and %i VST plugins, plus %i Sound Kits" % ( | |||
| internalCount, ladspaCount, dssiCount, lv2Count, vstCount, kitCount))) | |||
| self._checkFilters() | |||
| @@ -158,10 +158,7 @@ class HostWindow(QMainWindow): | |||
| # Internal stuff (patchbay) | |||
| self.fExportImage = QImage() | |||
| self.fPeaksCleared = True | |||
| self.fExternalPatchbay = False | |||
| self.fSelectedPlugins = [] | |||
| self.fCanvasWidth = 0 | |||
| @@ -219,11 +216,6 @@ class HostWindow(QMainWindow): | |||
| self.ui.act_engine_stop.setEnabled(False) | |||
| self.ui.act_plugin_remove_all.setEnabled(False) | |||
| self.ui.act_canvas_show_internal.setChecked(False) | |||
| self.ui.act_canvas_show_internal.setVisible(False) | |||
| self.ui.act_canvas_show_external.setChecked(False) | |||
| self.ui.act_canvas_show_external.setVisible(False) | |||
| self.ui.menu_PluginMacros.setEnabled(False) | |||
| self.ui.menu_Canvas.setEnabled(False) | |||
| @@ -231,8 +223,6 @@ class HostWindow(QMainWindow): | |||
| self.ui.dockWidget.setTitleBarWidget(self.ui.dockWidgetTitleBar) | |||
| if not withCanvas: | |||
| self.ui.act_canvas_show_internal.setVisible(False) | |||
| self.ui.act_canvas_show_external.setVisible(False) | |||
| self.ui.act_canvas_arrange.setVisible(False) | |||
| self.ui.act_canvas_refresh.setVisible(False) | |||
| self.ui.act_canvas_save_image.setVisible(False) | |||
| @@ -411,8 +401,6 @@ class HostWindow(QMainWindow): | |||
| self.ui.act_plugins_expand.triggered.connect(self.slot_pluginsExpand) | |||
| self.ui.act_plugins_panic.triggered.connect(self.slot_pluginsDisable) | |||
| self.ui.act_canvas_show_internal.triggered.connect(self.slot_canvasShowInternal) | |||
| self.ui.act_canvas_show_external.triggered.connect(self.slot_canvasShowExternal) | |||
| self.ui.act_canvas_arrange.triggered.connect(self.slot_canvasArrange) | |||
| self.ui.act_canvas_refresh.triggered.connect(self.slot_canvasRefresh) | |||
| self.ui.act_canvas_zoom_fit.triggered.connect(self.slot_canvasZoomFit) | |||
| @@ -429,7 +417,6 @@ class HostWindow(QMainWindow): | |||
| self.ui.act_settings_configure.triggered.connect(self.slot_configureCarla) | |||
| self.ui.act_help_about.triggered.connect(self.slot_aboutCarla) | |||
| self.ui.act_help_about_juce.triggered.connect(self.slot_aboutJuce) | |||
| self.ui.act_help_about_qt.triggered.connect(self.slot_aboutQt) | |||
| self.ui.cb_disk.currentIndexChanged.connect(self.slot_diskFolderChanged) | |||
| @@ -511,10 +498,6 @@ class HostWindow(QMainWindow): | |||
| if self.host.isPlugin: | |||
| self.startTimers() | |||
| # Start in patchbay tab if using forced patchbay mode | |||
| if host.processModeForced and host.processMode == ENGINE_PROCESS_MODE_PATCHBAY and not host.isControl: | |||
| self.ui.tabWidget.setCurrentIndex(1) | |||
| # Load initial project file if set | |||
| if not (self.host.isControl or self.host.isPlugin): | |||
| projectFile = getInitialProjectFile(QApplication.instance()) | |||
| @@ -762,23 +745,6 @@ class HostWindow(QMainWindow): | |||
| self.ui.menu_PluginMacros.setEnabled(True) | |||
| self.ui.menu_Canvas.setEnabled(True) | |||
| self.ui.act_canvas_show_internal.blockSignals(True) | |||
| self.ui.act_canvas_show_external.blockSignals(True) | |||
| if processMode == ENGINE_PROCESS_MODE_PATCHBAY and not (self.host.isControl or self.host.isPlugin): | |||
| self.ui.act_canvas_show_internal.setChecked(True) | |||
| self.ui.act_canvas_show_internal.setVisible(True) | |||
| self.ui.act_canvas_show_external.setChecked(False) | |||
| self.ui.act_canvas_show_external.setVisible(True) | |||
| else: | |||
| self.ui.act_canvas_show_internal.setChecked(False) | |||
| self.ui.act_canvas_show_internal.setVisible(False) | |||
| self.ui.act_canvas_show_external.setChecked(False) | |||
| self.ui.act_canvas_show_external.setVisible(False) | |||
| self.ui.act_canvas_show_internal.blockSignals(False) | |||
| self.ui.act_canvas_show_external.blockSignals(False) | |||
| if not (self.host.isControl or self.host.isPlugin): | |||
| canSave = (self.fProjectFilename and os.path.exists(self.fProjectFilename)) or not self.fSessionManagerName | |||
| self.ui.act_file_save.setEnabled(canSave) | |||
| @@ -1200,28 +1166,6 @@ class HostWindow(QMainWindow): | |||
| # -------------------------------------------------------------------------------------------------------- | |||
| # Canvas (menu actions) | |||
| @pyqtSlot() | |||
| def slot_canvasShowInternal(self): | |||
| self.fExternalPatchbay = False | |||
| self.ui.act_canvas_show_internal.blockSignals(True) | |||
| self.ui.act_canvas_show_external.blockSignals(True) | |||
| self.ui.act_canvas_show_internal.setChecked(True) | |||
| self.ui.act_canvas_show_external.setChecked(False) | |||
| self.ui.act_canvas_show_internal.blockSignals(False) | |||
| self.ui.act_canvas_show_external.blockSignals(False) | |||
| self.slot_canvasRefresh() | |||
| @pyqtSlot() | |||
| def slot_canvasShowExternal(self): | |||
| self.fExternalPatchbay = True | |||
| self.ui.act_canvas_show_internal.blockSignals(True) | |||
| self.ui.act_canvas_show_external.blockSignals(True) | |||
| self.ui.act_canvas_show_internal.setChecked(False) | |||
| self.ui.act_canvas_show_external.setChecked(True) | |||
| self.ui.act_canvas_show_internal.blockSignals(False) | |||
| self.ui.act_canvas_show_external.blockSignals(False) | |||
| self.slot_canvasRefresh() | |||
| @pyqtSlot() | |||
| def slot_canvasArrange(self): | |||
| patchcanvas.arrange() | |||
| @@ -1234,7 +1178,7 @@ class HostWindow(QMainWindow): | |||
| return | |||
| if self.host.is_engine_running(): | |||
| self.host.patchbay_refresh(self.fExternalPatchbay) | |||
| self.host.patchbay_refresh() | |||
| self.updateMiniCanvasLater() | |||
| @@ -1558,7 +1502,7 @@ class HostWindow(QMainWindow): | |||
| if self.host.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK and self.host.isPlugin: | |||
| pass | |||
| elif self.host.is_engine_running(): | |||
| self.host.patchbay_refresh(self.fExternalPatchbay) | |||
| self.host.patchbay_refresh() | |||
| for pitem in self.fPluginList: | |||
| if pitem is None: | |||
| @@ -1573,10 +1517,6 @@ class HostWindow(QMainWindow): | |||
| def slot_aboutCarla(self): | |||
| CarlaAboutW(self.fParentOrSelf, self.host).exec_() | |||
| @pyqtSlot() | |||
| def slot_aboutJuce(self): | |||
| JuceAboutW(self.fParentOrSelf).exec_() | |||
| @pyqtSlot() | |||
| def slot_aboutQt(self): | |||
| QApplication.instance().aboutQt() | |||
| @@ -2659,7 +2599,6 @@ def setEngineSettings(host): | |||
| DSSI_PATH = toList(settings.value(CARLA_KEY_PATHS_DSSI, CARLA_DEFAULT_DSSI_PATH)) | |||
| LV2_PATH = toList(settings.value(CARLA_KEY_PATHS_LV2, CARLA_DEFAULT_LV2_PATH)) | |||
| VST2_PATH = toList(settings.value(CARLA_KEY_PATHS_VST2, CARLA_DEFAULT_VST2_PATH)) | |||
| VST3_PATH = toList(settings.value(CARLA_KEY_PATHS_VST3, CARLA_DEFAULT_VST3_PATH)) | |||
| GIG_PATH = toList(settings.value(CARLA_KEY_PATHS_GIG, CARLA_DEFAULT_GIG_PATH)) | |||
| SF2_PATH = toList(settings.value(CARLA_KEY_PATHS_SF2, CARLA_DEFAULT_SF2_PATH)) | |||
| SFZ_PATH = toList(settings.value(CARLA_KEY_PATHS_SFZ, CARLA_DEFAULT_SFZ_PATH)) | |||
| @@ -2668,7 +2607,6 @@ def setEngineSettings(host): | |||
| host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_DSSI, splitter.join(DSSI_PATH)) | |||
| host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_LV2, splitter.join(LV2_PATH)) | |||
| host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST2, splitter.join(VST2_PATH)) | |||
| host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST3, splitter.join(VST3_PATH)) | |||
| host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_GIG, splitter.join(GIG_PATH)) | |||
| host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_SF2, splitter.join(SF2_PATH)) | |||
| host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_SFZ, splitter.join(SFZ_PATH)) | |||
| @@ -202,7 +202,6 @@ class CarlaSettingsW(QDialog): | |||
| PATH_INDEX_DSSI = 1 | |||
| PATH_INDEX_LV2 = 2 | |||
| PATH_INDEX_VST2 = 3 | |||
| PATH_INDEX_VST3 = 4 | |||
| PATH_INDEX_GIG = 5 | |||
| PATH_INDEX_SF2 = 6 | |||
| PATH_INDEX_SFZ = 7 | |||
| @@ -315,7 +314,6 @@ class CarlaSettingsW(QDialog): | |||
| self.ui.lw_dssi.currentRowChanged.connect(self.slot_pluginPathRowChanged) | |||
| self.ui.lw_lv2.currentRowChanged.connect(self.slot_pluginPathRowChanged) | |||
| self.ui.lw_vst.currentRowChanged.connect(self.slot_pluginPathRowChanged) | |||
| self.ui.lw_vst3.currentRowChanged.connect(self.slot_pluginPathRowChanged) | |||
| self.ui.lw_gig.currentRowChanged.connect(self.slot_pluginPathRowChanged) | |||
| self.ui.lw_sf2.currentRowChanged.connect(self.slot_pluginPathRowChanged) | |||
| self.ui.lw_sfz.currentRowChanged.connect(self.slot_pluginPathRowChanged) | |||
| @@ -332,7 +330,6 @@ class CarlaSettingsW(QDialog): | |||
| self.ui.lw_dssi.setCurrentRow(0) | |||
| self.ui.lw_lv2.setCurrentRow(0) | |||
| self.ui.lw_vst.setCurrentRow(0) | |||
| self.ui.lw_vst3.setCurrentRow(0) | |||
| self.ui.lw_gig.setCurrentRow(0) | |||
| self.ui.lw_sf2.setCurrentRow(0) | |||
| self.ui.lw_sfz.setCurrentRow(0) | |||
| @@ -436,7 +433,6 @@ class CarlaSettingsW(QDialog): | |||
| dssis = toList(settings.value(CARLA_KEY_PATHS_DSSI, CARLA_DEFAULT_DSSI_PATH)) | |||
| lv2s = toList(settings.value(CARLA_KEY_PATHS_LV2, CARLA_DEFAULT_LV2_PATH)) | |||
| vst2s = toList(settings.value(CARLA_KEY_PATHS_VST2, CARLA_DEFAULT_VST2_PATH)) | |||
| vst3s = toList(settings.value(CARLA_KEY_PATHS_VST3, CARLA_DEFAULT_VST3_PATH)) | |||
| gigs = toList(settings.value(CARLA_KEY_PATHS_GIG, CARLA_DEFAULT_GIG_PATH)) | |||
| sf2s = toList(settings.value(CARLA_KEY_PATHS_SF2, CARLA_DEFAULT_SF2_PATH)) | |||
| sfzs = toList(settings.value(CARLA_KEY_PATHS_SFZ, CARLA_DEFAULT_SFZ_PATH)) | |||
| @@ -445,7 +441,6 @@ class CarlaSettingsW(QDialog): | |||
| dssis.sort() | |||
| lv2s.sort() | |||
| vst2s.sort() | |||
| vst3s.sort() | |||
| gigs.sort() | |||
| sf2s.sort() | |||
| sfzs.sort() | |||
| @@ -466,10 +461,6 @@ class CarlaSettingsW(QDialog): | |||
| if not vst2: continue | |||
| self.ui.lw_vst.addItem(vst2) | |||
| for vst3 in vst3s: | |||
| if not vst3: continue | |||
| self.ui.lw_vst3.addItem(vst3) | |||
| for gig in gigs: | |||
| if not gig: continue | |||
| self.ui.lw_gig.addItem(gig) | |||
| @@ -629,7 +620,6 @@ class CarlaSettingsW(QDialog): | |||
| dssis = [] | |||
| lv2s = [] | |||
| vst2s = [] | |||
| vst3s = [] | |||
| gigs = [] | |||
| sf2s = [] | |||
| sfzs = [] | |||
| @@ -646,9 +636,6 @@ class CarlaSettingsW(QDialog): | |||
| for i in range(self.ui.lw_vst.count()): | |||
| vst2s.append(self.ui.lw_vst.item(i).text()) | |||
| for i in range(self.ui.lw_vst3.count()): | |||
| vst3s.append(self.ui.lw_vst3.item(i).text()) | |||
| for i in range(self.ui.lw_gig.count()): | |||
| gigs.append(self.ui.lw_gig.item(i).text()) | |||
| @@ -662,7 +649,6 @@ class CarlaSettingsW(QDialog): | |||
| self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_DSSI, splitter.join(dssis)) | |||
| self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_LV2, splitter.join(lv2s)) | |||
| self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST2, splitter.join(vst2s)) | |||
| self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST3, splitter.join(vst3s)) | |||
| self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_GIG, splitter.join(gigs)) | |||
| self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_SF2, splitter.join(sf2s)) | |||
| self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_SFZ, splitter.join(sfzs)) | |||
| @@ -671,7 +657,6 @@ class CarlaSettingsW(QDialog): | |||
| settings.setValue(CARLA_KEY_PATHS_DSSI, dssis) | |||
| settings.setValue(CARLA_KEY_PATHS_LV2, lv2s) | |||
| settings.setValue(CARLA_KEY_PATHS_VST2, vst2s) | |||
| settings.setValue(CARLA_KEY_PATHS_VST3, vst3s) | |||
| settings.setValue(CARLA_KEY_PATHS_GIG, gigs) | |||
| settings.setValue(CARLA_KEY_PATHS_SF2, sf2s) | |||
| settings.setValue(CARLA_KEY_PATHS_SFZ, sfzs) | |||
| @@ -787,15 +772,6 @@ class CarlaSettingsW(QDialog): | |||
| if not path: continue | |||
| self.ui.lw_vst.addItem(path) | |||
| elif curIndex == self.PATH_INDEX_VST3: | |||
| paths = CARLA_DEFAULT_VST3_PATH | |||
| paths.sort() | |||
| self.ui.lw_vst3.clear() | |||
| for path in paths: | |||
| if not path: continue | |||
| self.ui.lw_vst3.addItem(path) | |||
| elif curIndex == self.PATH_INDEX_GIG: | |||
| paths = CARLA_DEFAULT_GIG_PATH | |||
| paths.sort() | |||
| @@ -928,8 +904,6 @@ class CarlaSettingsW(QDialog): | |||
| self.ui.lw_lv2.addItem(newPath) | |||
| elif curIndex == self.PATH_INDEX_VST2: | |||
| self.ui.lw_vst.addItem(newPath) | |||
| elif curIndex == self.PATH_INDEX_VST3: | |||
| self.ui.lw_vst3.addItem(newPath) | |||
| elif curIndex == self.PATH_INDEX_GIG: | |||
| self.ui.lw_gig.addItem(newPath) | |||
| elif curIndex == self.PATH_INDEX_SF2: | |||
| @@ -949,8 +923,6 @@ class CarlaSettingsW(QDialog): | |||
| self.ui.lw_lv2.takeItem(self.ui.lw_lv2.currentRow()) | |||
| elif curIndex == self.PATH_INDEX_VST2: | |||
| self.ui.lw_vst.takeItem(self.ui.lw_vst.currentRow()) | |||
| elif curIndex == self.PATH_INDEX_VST3: | |||
| self.ui.lw_vst3.takeItem(self.ui.lw_vst3.currentRow()) | |||
| elif curIndex == self.PATH_INDEX_GIG: | |||
| self.ui.lw_gig.takeItem(self.ui.lw_gig.currentRow()) | |||
| elif curIndex == self.PATH_INDEX_SF2: | |||
| @@ -970,8 +942,6 @@ class CarlaSettingsW(QDialog): | |||
| currentPath = self.ui.lw_lv2.currentItem().text() | |||
| elif curIndex == self.PATH_INDEX_VST2: | |||
| currentPath = self.ui.lw_vst.currentItem().text() | |||
| elif curIndex == self.PATH_INDEX_VST3: | |||
| currentPath = self.ui.lw_vst3.currentItem().text() | |||
| elif curIndex == self.PATH_INDEX_GIG: | |||
| currentPath = self.ui.lw_gig.currentItem().text() | |||
| elif curIndex == self.PATH_INDEX_SF2: | |||
| @@ -994,8 +964,6 @@ class CarlaSettingsW(QDialog): | |||
| self.ui.lw_lv2.currentItem().setText(newPath) | |||
| elif curIndex == self.PATH_INDEX_VST2: | |||
| self.ui.lw_vst.currentItem().setText(newPath) | |||
| elif curIndex == self.PATH_INDEX_VST3: | |||
| self.ui.lw_vst3.currentItem().setText(newPath) | |||
| elif curIndex == self.PATH_INDEX_GIG: | |||
| self.ui.lw_gig.currentItem().setText(newPath) | |||
| elif curIndex == self.PATH_INDEX_SF2: | |||
| @@ -1015,8 +983,6 @@ class CarlaSettingsW(QDialog): | |||
| row = self.ui.lw_lv2.currentRow() | |||
| elif index == self.PATH_INDEX_VST2: | |||
| row = self.ui.lw_vst.currentRow() | |||
| elif index == self.PATH_INDEX_VST3: | |||
| row = self.ui.lw_vst3.currentRow() | |||
| elif index == self.PATH_INDEX_GIG: | |||
| row = self.ui.lw_gig.currentRow() | |||
| elif index == self.PATH_INDEX_SF2: | |||
| @@ -222,7 +222,6 @@ CARLA_KEY_PATHS_LADSPA = "Paths/LADSPA" | |||
| CARLA_KEY_PATHS_DSSI = "Paths/DSSI" | |||
| CARLA_KEY_PATHS_LV2 = "Paths/LV2" | |||
| CARLA_KEY_PATHS_VST2 = "Paths/VST2" | |||
| CARLA_KEY_PATHS_VST3 = "Paths/VST3" | |||
| CARLA_KEY_PATHS_GIG = "Paths/GIG" | |||
| CARLA_KEY_PATHS_SF2 = "Paths/SF2" | |||
| CARLA_KEY_PATHS_SFZ = "Paths/SFZ" | |||
| @@ -294,7 +293,7 @@ if LINUX: | |||
| CARLA_DEFAULT_PROCESS_MODE = ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS | |||
| CARLA_DEFAULT_TRANSPORT_MODE = ENGINE_TRANSPORT_MODE_JACK | |||
| else: | |||
| CARLA_DEFAULT_PROCESS_MODE = ENGINE_PROCESS_MODE_PATCHBAY | |||
| CARLA_DEFAULT_PROCESS_MODE = ENGINE_PROCESS_MODE_CONTINUOUS_RACK | |||
| CARLA_DEFAULT_TRANSPORT_MODE = ENGINE_TRANSPORT_MODE_INTERNAL | |||
| # Wine | |||
| @@ -320,7 +319,6 @@ DEFAULT_LADSPA_PATH = "" | |||
| DEFAULT_DSSI_PATH = "" | |||
| DEFAULT_LV2_PATH = "" | |||
| DEFAULT_VST2_PATH = "" | |||
| DEFAULT_VST3_PATH = "" | |||
| DEFAULT_GIG_PATH = "" | |||
| DEFAULT_SF2_PATH = "" | |||
| DEFAULT_SFZ_PATH = "" | |||
| @@ -362,8 +360,6 @@ if WINDOWS: | |||
| if kIs64bit: | |||
| DEFAULT_VST2_PATH += ";" + COMMONPROGRAMFILES + "\\VST2" | |||
| DEFAULT_VST3_PATH = COMMONPROGRAMFILES + "\\VST3" | |||
| DEFAULT_GIG_PATH = APPDATA + "\\GIG" | |||
| DEFAULT_SF2_PATH = APPDATA + "\\SF2" | |||
| DEFAULT_SFZ_PATH = APPDATA + "\\SFZ" | |||
| @@ -374,9 +370,6 @@ if WINDOWS: | |||
| DEFAULT_VST2_PATH += ";" + PROGRAMFILESx86 + "\\VstPlugins" | |||
| DEFAULT_VST2_PATH += ";" + PROGRAMFILESx86 + "\\Steinberg\\VstPlugins" | |||
| if COMMONPROGRAMFILESx86: | |||
| DEFAULT_VST3_PATH += COMMONPROGRAMFILESx86 + "\\VST3" | |||
| elif HAIKU: | |||
| splitter = ":" | |||
| @@ -392,9 +385,6 @@ elif HAIKU: | |||
| DEFAULT_VST2_PATH = HOME + "/.vst" | |||
| DEFAULT_VST2_PATH += ":/boot/common/add-ons/vst" | |||
| DEFAULT_VST3_PATH = HOME + "/.vst3" | |||
| DEFAULT_VST3_PATH += ":/boot/common/add-ons/vst3" | |||
| elif MACOS: | |||
| splitter = ":" | |||
| @@ -410,9 +400,6 @@ elif MACOS: | |||
| DEFAULT_VST2_PATH = HOME + "/Library/Audio/Plug-Ins/VST" | |||
| DEFAULT_VST2_PATH += ":/Library/Audio/Plug-Ins/VST" | |||
| DEFAULT_VST3_PATH = HOME + "/Library/Audio/Plug-Ins/VST3" | |||
| DEFAULT_VST3_PATH += ":/Library/Audio/Plug-Ins/VST3" | |||
| else: | |||
| splitter = ":" | |||
| @@ -432,10 +419,6 @@ else: | |||
| DEFAULT_VST2_PATH += ":/usr/lib/vst" | |||
| DEFAULT_VST2_PATH += ":/usr/local/lib/vst" | |||
| DEFAULT_VST3_PATH = HOME + "/.vst3" | |||
| DEFAULT_VST3_PATH += ":/usr/lib/vst3" | |||
| DEFAULT_VST3_PATH += ":/usr/local/lib/vst3" | |||
| DEFAULT_GIG_PATH = HOME + "/.sounds/gig" | |||
| DEFAULT_GIG_PATH += ":/usr/share/sounds/gig" | |||
| @@ -453,11 +436,9 @@ if not WINDOWS: | |||
| if os.path.exists(winePrefix): | |||
| DEFAULT_VST2_PATH += ":" + winePrefix + "/drive_c/Program Files/VstPlugins" | |||
| DEFAULT_VST3_PATH += ":" + winePrefix + "/drive_c/Program Files/Common Files/VST3" | |||
| if kIs64bit and os.path.exists(winePrefix + "/drive_c/Program Files (x86)"): | |||
| DEFAULT_VST2_PATH += ":" + winePrefix + "/drive_c/Program Files (x86)/VstPlugins" | |||
| DEFAULT_VST3_PATH += ":" + winePrefix + "/drive_c/Program Files (x86)/Common Files/VST3" | |||
| del winePrefix | |||
| @@ -487,7 +468,6 @@ if readEnvVars: | |||
| CARLA_DEFAULT_DSSI_PATH = os.getenv("DSSI_PATH", DEFAULT_DSSI_PATH).split(splitter) | |||
| CARLA_DEFAULT_LV2_PATH = os.getenv("LV2_PATH", DEFAULT_LV2_PATH).split(splitter) | |||
| CARLA_DEFAULT_VST2_PATH = os.getenv("VST_PATH", DEFAULT_VST2_PATH).split(splitter) | |||
| CARLA_DEFAULT_VST3_PATH = os.getenv("VST3_PATH", DEFAULT_VST3_PATH).split(splitter) | |||
| CARLA_DEFAULT_GIG_PATH = os.getenv("GIG_PATH", DEFAULT_GIG_PATH).split(splitter) | |||
| CARLA_DEFAULT_SF2_PATH = os.getenv("SF2_PATH", DEFAULT_SF2_PATH).split(splitter) | |||
| CARLA_DEFAULT_SFZ_PATH = os.getenv("SFZ_PATH", DEFAULT_SFZ_PATH).split(splitter) | |||
| @@ -497,7 +477,6 @@ else: | |||
| CARLA_DEFAULT_DSSI_PATH = DEFAULT_DSSI_PATH.split(splitter) | |||
| CARLA_DEFAULT_LV2_PATH = DEFAULT_LV2_PATH.split(splitter) | |||
| CARLA_DEFAULT_VST2_PATH = DEFAULT_VST2_PATH.split(splitter) | |||
| CARLA_DEFAULT_VST3_PATH = DEFAULT_VST3_PATH.split(splitter) | |||
| CARLA_DEFAULT_GIG_PATH = DEFAULT_GIG_PATH.split(splitter) | |||
| CARLA_DEFAULT_SF2_PATH = DEFAULT_SF2_PATH.split(splitter) | |||
| CARLA_DEFAULT_SFZ_PATH = DEFAULT_SFZ_PATH.split(splitter) | |||
| @@ -509,7 +488,6 @@ del DEFAULT_LADSPA_PATH | |||
| del DEFAULT_DSSI_PATH | |||
| del DEFAULT_LV2_PATH | |||
| del DEFAULT_VST2_PATH | |||
| del DEFAULT_VST3_PATH | |||
| del DEFAULT_GIG_PATH | |||
| del DEFAULT_SF2_PATH | |||
| del DEFAULT_SFZ_PATH | |||
| @@ -1813,7 +1813,7 @@ def getSkinStyle(host, pluginId): | |||
| pluginMaker = pluginInfo['maker'] | |||
| uniqueId = pluginInfo['uniqueId'] | |||
| if pluginInfo['type'] in (PLUGIN_VST2, PLUGIN_VST3, PLUGIN_AU): | |||
| if pluginInfo['type'] == PLUGIN_VST2: | |||
| progCount = host.get_program_count(pluginId) | |||
| else: | |||
| progCount = host.get_midi_program_count(pluginId) | |||
| @@ -1853,7 +1853,7 @@ def getSkinStyle(host, pluginId): | |||
| # Presets | |||
| if progCount > 1 and (pluginInfo['hints'] & PLUGIN_USES_MULTI_PROGS) == 0: | |||
| if pluginInfo['type'] in (PLUGIN_VST2, PLUGIN_VST3, PLUGIN_AU): | |||
| if pluginInfo['type'] == PLUGIN_VST2: | |||
| return "presets" | |||
| return "mpresets" | |||
| @@ -42,10 +42,6 @@ def getPluginTypeAsString(ptype): | |||
| return "LV2" | |||
| if ptype == PLUGIN_VST2: | |||
| return "VST2" | |||
| if ptype == PLUGIN_VST3: | |||
| return "VST3" | |||
| if ptype == PLUGIN_AU: | |||
| return "AU" | |||
| if ptype == PLUGIN_GIG: | |||
| return "GIG" | |||
| if ptype == PLUGIN_SF2: | |||
| @@ -76,10 +72,6 @@ def getPluginTypeFromString(stype): | |||
| return PLUGIN_LV2 | |||
| if stype in ("vst2", "vst"): | |||
| return PLUGIN_VST2 | |||
| if stype == "vst3": | |||
| return PLUGIN_VST3 | |||
| if stype in ("au", "audiounit"): | |||
| return PLUGIN_AU | |||
| if stype == "gig": | |||
| return PLUGIN_GIG | |||
| if stype == "sf2": | |||
| @@ -172,9 +164,6 @@ class CarlaUtils(object): | |||
| self.lib.carla_get_complete_license_text.argtypes = None | |||
| self.lib.carla_get_complete_license_text.restype = c_char_p | |||
| self.lib.carla_get_juce_version.argtypes = None | |||
| self.lib.carla_get_juce_version.restype = c_char_p | |||
| self.lib.carla_get_supported_file_extensions.argtypes = None | |||
| self.lib.carla_get_supported_file_extensions.restype = c_char_p | |||
| @@ -270,10 +259,6 @@ class CarlaUtils(object): | |||
| def get_complete_license_text(self): | |||
| return charPtrToString(self.lib.carla_get_complete_license_text()) | |||
| # Get the juce version used in the current Carla build. | |||
| def get_juce_version(self): | |||
| return charPtrToString(self.lib.carla_get_juce_version()) | |||
| # Get all the supported file extensions in carla_load_file(). | |||
| # Returned string uses this syntax: | |||
| # @code | |||
| @@ -37,7 +37,6 @@ else: | |||
| # Imports (Custom) | |||
| import ui_carla_about | |||
| import ui_carla_about_juce | |||
| import ui_carla_edit | |||
| import ui_carla_parameter | |||
| @@ -150,25 +149,8 @@ class CarlaAboutW(QDialog): | |||
| "<li>http://ll-plugins.nongnu.org/lv2/ext/midimap</li>" | |||
| "<li>http://ll-plugins.nongnu.org/lv2/ext/miditype</li>" | |||
| "</ul>")) | |||
| if MACOS or WINDOWS: | |||
| self.ui.l_vst2.setText(self.tr("Using Juce host")) | |||
| self.ui.l_vst3.setText(self.tr("Using Juce host")) | |||
| if MACOS: | |||
| self.ui.l_au.setText(self.tr("Using Juce host")) | |||
| else: | |||
| self.ui.line_vst3.hide() | |||
| self.ui.l_au.hide() | |||
| self.ui.lid_au.hide() | |||
| else: | |||
| self.ui.l_vst2.setText(self.tr("About 85% complete (missing vst bank/presets and some minor stuff)")) | |||
| self.ui.line_vst2.hide() | |||
| self.ui.l_vst3.hide() | |||
| self.ui.lid_vst3.hide() | |||
| self.ui.line_vst3.hide() | |||
| self.ui.l_au.hide() | |||
| self.ui.lid_au.hide() | |||
| self.ui.l_vst2.setText(self.tr("About 85% complete (missing vst bank/presets and some minor stuff)")) | |||
| # 2nd tab is usually longer than the 1st | |||
| # adjust appropriately | |||
| @@ -185,27 +167,6 @@ class CarlaAboutW(QDialog): | |||
| QDialog.done(self, r) | |||
| self.close() | |||
| # ------------------------------------------------------------------------------------------------------------ | |||
| # JUCE About dialog | |||
| class JuceAboutW(QDialog): | |||
| def __init__(self, parent): | |||
| QDialog.__init__(self, parent) | |||
| self.ui = ui_carla_about_juce.Ui_JuceAboutW() | |||
| self.ui.setupUi(self) | |||
| self.ui.l_text2.setText(self.tr("This program uses JUCE version %s." % gCarla.utils.get_juce_version())) | |||
| self.adjustSize() | |||
| self.setFixedSize(self.size()) | |||
| if WINDOWS: | |||
| self.setWindowFlags(self.windowFlags()|Qt.MSWindowsFixedSizeDialogHint) | |||
| def done(self, r): | |||
| QDialog.done(self, r) | |||
| self.close() | |||
| # ------------------------------------------------------------------------------------------------------------ | |||
| # Plugin Parameter | |||
| @@ -29,11 +29,6 @@ endif | |||
| # ---------------------------------------------------------------------------------------------------------------------------- | |||
| BUILD_CXX_FLAGS += -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/utils -isystem $(CWD)/modules | |||
| BUILD_CXX_FLAGS += -I$(CWD)/includes/vst2 -I$(CWD)/includes/vst3 | |||
| ifeq ($(CARLA_VESTIGE_HEADER),true) | |||
| BUILD_CXX_FLAGS += -DVESTIGE_HEADER | |||
| endif | |||
| ifeq ($(MACOS),true) | |||
| BUILD_CXX_FLAGS += -ObjC++ | |||
| @@ -78,53 +73,6 @@ LIBS_win32 += $(MODULEDIR)/lilv.win32.a | |||
| LIBS_win64 += $(MODULEDIR)/lilv.win64.a | |||
| LINK_FLAGS += $(LILV_LIBS) | |||
| ifeq ($(MACOS_OR_WIN32),true) | |||
| LIBS_native += $(MODULEDIR)/juce_audio_basics.a | |||
| LIBS_posix32 += $(MODULEDIR)/juce_audio_basics.posix32.a | |||
| LIBS_posix64 += $(MODULEDIR)/juce_audio_basics.posix64.a | |||
| LIBS_win32 += $(MODULEDIR)/juce_audio_basics.win32.a | |||
| LIBS_win64 += $(MODULEDIR)/juce_audio_basics.win64.a | |||
| LIBS_native += $(MODULEDIR)/juce_audio_processors.a | |||
| LIBS_posix32 += $(MODULEDIR)/juce_audio_processors.posix32.a | |||
| LIBS_posix64 += $(MODULEDIR)/juce_audio_processors.posix64.a | |||
| LIBS_win32 += $(MODULEDIR)/juce_audio_processors.win32.a | |||
| LIBS_win64 += $(MODULEDIR)/juce_audio_processors.win64.a | |||
| LIBS_native += $(MODULEDIR)/juce_data_structures.a | |||
| LIBS_posix32 += $(MODULEDIR)/juce_data_structures.posix32.a | |||
| LIBS_posix64 += $(MODULEDIR)/juce_data_structures.posix64.a | |||
| LIBS_win32 += $(MODULEDIR)/juce_data_structures.win32.a | |||
| LIBS_win64 += $(MODULEDIR)/juce_data_structures.win64.a | |||
| LIBS_native += $(MODULEDIR)/juce_events.a | |||
| LIBS_posix32 += $(MODULEDIR)/juce_events.posix32.a | |||
| LIBS_posix64 += $(MODULEDIR)/juce_events.posix64.a | |||
| LIBS_win32 += $(MODULEDIR)/juce_events.win32.a | |||
| LIBS_win64 += $(MODULEDIR)/juce_events.win64.a | |||
| LIBS_native += $(MODULEDIR)/juce_graphics.a | |||
| LIBS_posix32 += $(MODULEDIR)/juce_graphics.posix32.a | |||
| LIBS_posix64 += $(MODULEDIR)/juce_graphics.posix64.a | |||
| LIBS_win32 += $(MODULEDIR)/juce_graphics.win32.a | |||
| LIBS_win64 += $(MODULEDIR)/juce_graphics.win64.a | |||
| LIBS_native += $(MODULEDIR)/juce_gui_basics.a | |||
| LIBS_posix32 += $(MODULEDIR)/juce_gui_basics.posix32.a | |||
| LIBS_posix64 += $(MODULEDIR)/juce_gui_basics.posix64.a | |||
| LIBS_win32 += $(MODULEDIR)/juce_gui_basics.win32.a | |||
| LIBS_win64 += $(MODULEDIR)/juce_gui_basics.win64.a | |||
| ifeq ($(MACOS),true) | |||
| LIBS_native += $(MODULEDIR)/juce_gui_extra.a | |||
| LIBS_posix32 += $(MODULEDIR)/juce_gui_extra.posix32.a | |||
| LIBS_posix64 += $(MODULEDIR)/juce_gui_extra.posix64.a | |||
| endif | |||
| LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS) | |||
| LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS) | |||
| LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS) | |||
| LINK_FLAGS += $(JUCE_EVENTS_LIBS) | |||
| LINK_FLAGS += $(JUCE_GRAPHICS_LIBS) | |||
| LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS) | |||
| ifeq ($(MACOS),true) | |||
| LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS) | |||
| endif | |||
| endif | |||
| ifeq ($(UNIX),true) | |||
| LINK_FLAGS += -ldl | |||
| endif | |||
| @@ -23,11 +23,6 @@ | |||
| #include "AppConfig.h" | |||
| #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
| # define USE_JUCE_PROCESSORS | |||
| # include "juce_audio_processors/juce_audio_processors.h" | |||
| #endif | |||
| #ifdef BUILD_BRIDGE | |||
| # undef HAVE_FLUIDSYNTH | |||
| # undef HAVE_LINUXSAMPLER | |||
| @@ -1439,124 +1434,6 @@ static void do_vst_check(lib_t& libHandle, const bool doInit) | |||
| } | |||
| #endif // ! CARLA_OS_MAC | |||
| #ifdef USE_JUCE_PROCESSORS | |||
| static void do_juce_check(const char* const filename_, const char* const stype, const bool doInit) | |||
| { | |||
| CARLA_SAFE_ASSERT_RETURN(stype != nullptr && stype[0] != 0,) // FIXME | |||
| carla_debug("do_juce_check(%s, %s, %s)", filename_, stype, bool2str(doInit)); | |||
| using namespace juce; | |||
| juce::String filename; | |||
| #ifdef CARLA_OS_WIN | |||
| // Fix for wine usage | |||
| if (juce_isRunningInWine() && filename_[0] == '/') | |||
| { | |||
| filename = filename_; | |||
| filename.replace("/", "\\"); | |||
| filename = "Z:" + filename; | |||
| } | |||
| else | |||
| #endif | |||
| filename = File(filename_).getFullPathName(); | |||
| juce::ScopedPointer<AudioPluginFormat> pluginFormat; | |||
| /* */ if (std::strcmp(stype, "VST2") == 0) | |||
| { | |||
| #if JUCE_PLUGINHOST_VST | |||
| pluginFormat = new VSTPluginFormat(); | |||
| #else | |||
| DISCOVERY_OUT("error", "VST support not available"); | |||
| #endif | |||
| } | |||
| else if (std::strcmp(stype, "VST3") == 0) | |||
| { | |||
| #if JUCE_PLUGINHOST_VST3 | |||
| pluginFormat = new VST3PluginFormat(); | |||
| #else | |||
| DISCOVERY_OUT("error", "VST3 support not available"); | |||
| #endif | |||
| } | |||
| else if (std::strcmp(stype, "AU") == 0) | |||
| { | |||
| #if JUCE_PLUGINHOST_AU | |||
| pluginFormat = new AudioUnitPluginFormat(); | |||
| #else | |||
| DISCOVERY_OUT("error", "AU support not available"); | |||
| #endif | |||
| } | |||
| if (pluginFormat == nullptr) | |||
| { | |||
| DISCOVERY_OUT("error", stype << " support not available"); | |||
| return; | |||
| } | |||
| #ifdef CARLA_OS_WIN | |||
| CARLA_SAFE_ASSERT_RETURN(File(filename).existsAsFile(),); | |||
| #endif | |||
| CARLA_SAFE_ASSERT_RETURN(pluginFormat->fileMightContainThisPluginType(filename),); | |||
| OwnedArray<PluginDescription> results; | |||
| pluginFormat->findAllTypesForFile(results, filename); | |||
| if (results.size() == 0) | |||
| { | |||
| DISCOVERY_OUT("error", "No plugins found"); | |||
| return; | |||
| } | |||
| for (PluginDescription **it = results.begin(), **end = results.end(); it != end; ++it) | |||
| { | |||
| PluginDescription* const desc(*it); | |||
| uint hints = 0x0; | |||
| int audioIns = desc->numInputChannels; | |||
| int audioOuts = desc->numOutputChannels; | |||
| int midiIns = 0; | |||
| int midiOuts = 0; | |||
| int parameters = 0; | |||
| if (desc->isInstrument) | |||
| hints |= PLUGIN_IS_SYNTH; | |||
| if (doInit) | |||
| { | |||
| if (AudioPluginInstance* const instance = pluginFormat->createInstanceFromDescription(*desc, kSampleRate, kBufferSize)) | |||
| { | |||
| instance->refreshParameterList(); | |||
| parameters = instance->getNumParameters(); | |||
| if (instance->hasEditor()) | |||
| hints |= PLUGIN_HAS_CUSTOM_UI; | |||
| if (instance->acceptsMidi()) | |||
| midiIns = 1; | |||
| if (instance->producesMidi()) | |||
| midiOuts = 1; | |||
| delete instance; | |||
| } | |||
| } | |||
| DISCOVERY_OUT("init", "-----------"); | |||
| DISCOVERY_OUT("build", BINARY_NATIVE); | |||
| DISCOVERY_OUT("hints", hints); | |||
| DISCOVERY_OUT("name", desc->descriptiveName); | |||
| DISCOVERY_OUT("label", desc->name); | |||
| DISCOVERY_OUT("maker", desc->manufacturerName); | |||
| DISCOVERY_OUT("uniqueId", desc->uid); | |||
| DISCOVERY_OUT("audio.ins", audioIns); | |||
| DISCOVERY_OUT("audio.outs", audioOuts); | |||
| DISCOVERY_OUT("midi.ins", midiIns); | |||
| DISCOVERY_OUT("midi.outs", midiOuts); | |||
| DISCOVERY_OUT("parameters.ins", parameters); | |||
| DISCOVERY_OUT("end", "------------"); | |||
| } | |||
| } | |||
| #endif | |||
| static void do_fluidsynth_check(const char* const filename, const bool doInit) | |||
| { | |||
| #ifdef HAVE_FLUIDSYNTH | |||
| @@ -1772,25 +1649,7 @@ int main(int argc, char* argv[]) | |||
| do_lv2_check(filename, doInit); | |||
| break; | |||
| case PLUGIN_VST2: | |||
| #ifdef CARLA_OS_MAC | |||
| do_juce_check(filename, "VST2", doInit); | |||
| #else | |||
| do_vst_check(handle, doInit); | |||
| #endif | |||
| break; | |||
| case PLUGIN_VST3: | |||
| #ifdef USE_JUCE_PROCESSORS | |||
| do_juce_check(filename, "VST3", doInit); | |||
| #else | |||
| DISCOVERY_OUT("error", "VST3 support not available"); | |||
| #endif | |||
| break; | |||
| case PLUGIN_AU: | |||
| #ifdef USE_JUCE_PROCESSORS | |||
| do_juce_check(filename, "AU", doInit); | |||
| #else | |||
| DISCOVERY_OUT("error", "AU support not available"); | |||
| #endif | |||
| break; | |||
| case PLUGIN_GIG: | |||
| do_linuxsampler_check(filename, "gig", doInit); | |||
| @@ -29,7 +29,6 @@ | |||
| // always enabled | |||
| #define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 | |||
| #define JUCE_MODULE_AVAILABLE_juce_audio_formats 1 | |||
| #define JUCE_MODULE_AVAILABLE_juce_core 1 | |||
| // always disabled | |||
| @@ -39,24 +38,15 @@ | |||
| #define JUCE_MODULE_AVAILABLE_juce_opengl 0 | |||
| #define JUCE_MODULE_AVAILABLE_juce_video 0 | |||
| // conditional | |||
| #if defined(APPCONFIG_OS_MAC) || defined(APPCONFIG_OS_WIN) | |||
| # define JUCE_MODULE_AVAILABLE_juce_audio_devices 1 | |||
| # define JUCE_MODULE_AVAILABLE_juce_audio_processors 1 | |||
| # define JUCE_MODULE_AVAILABLE_juce_data_structures 1 | |||
| # define JUCE_MODULE_AVAILABLE_juce_events 1 | |||
| # define JUCE_MODULE_AVAILABLE_juce_graphics 1 | |||
| # define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 | |||
| # define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 | |||
| #else | |||
| # define JUCE_MODULE_AVAILABLE_juce_audio_devices 0 | |||
| # define JUCE_MODULE_AVAILABLE_juce_audio_processors 0 | |||
| # define JUCE_MODULE_AVAILABLE_juce_data_structures 0 | |||
| # define JUCE_MODULE_AVAILABLE_juce_events 0 | |||
| # define JUCE_MODULE_AVAILABLE_juce_graphics 0 | |||
| # define JUCE_MODULE_AVAILABLE_juce_gui_basics 0 | |||
| # define JUCE_MODULE_AVAILABLE_juce_gui_extra 0 | |||
| #endif | |||
| // also disabled | |||
| #define JUCE_MODULE_AVAILABLE_juce_audio_devices 0 | |||
| #define JUCE_MODULE_AVAILABLE_juce_audio_formats 0 | |||
| #define JUCE_MODULE_AVAILABLE_juce_audio_processors 0 | |||
| #define JUCE_MODULE_AVAILABLE_juce_data_structures 0 | |||
| #define JUCE_MODULE_AVAILABLE_juce_events 0 | |||
| #define JUCE_MODULE_AVAILABLE_juce_graphics 0 | |||
| #define JUCE_MODULE_AVAILABLE_juce_gui_basics 0 | |||
| #define JUCE_MODULE_AVAILABLE_juce_gui_extra 0 | |||
| // misc | |||
| #define JUCE_DISABLE_JUCE_VERSION_PRINTING 1 | |||
| @@ -10,15 +10,7 @@ all: | |||
| clean: | |||
| $(MAKE) clean -C juce_audio_basics | |||
| $(MAKE) clean -C juce_audio_devices | |||
| $(MAKE) clean -C juce_audio_formats | |||
| $(MAKE) clean -C juce_audio_processors | |||
| $(MAKE) clean -C juce_core | |||
| $(MAKE) clean -C juce_data_structures | |||
| $(MAKE) clean -C juce_events | |||
| $(MAKE) clean -C juce_graphics | |||
| $(MAKE) clean -C juce_gui_basics | |||
| $(MAKE) clean -C juce_gui_extra | |||
| $(MAKE) clean -C lilv | |||
| $(MAKE) clean -C rtaudio | |||
| $(MAKE) clean -C rtmempool | |||
| @@ -166,6 +166,7 @@ static const NativePluginDescriptor sNativePluginDescriptors[] = { | |||
| }, | |||
| #if 0 | |||
| // ----------------------------------------------------------------------- | |||
| // Audio file | |||
| @@ -186,6 +187,7 @@ static const NativePluginDescriptor sNativePluginDescriptors[] = { | |||
| /* copyright */ "GNU GPL v2+", | |||
| DESCFUNCS | |||
| }, | |||
| #endif | |||
| // ----------------------------------------------------------------------- | |||
| // MIDI file and sequencer | |||
| @@ -17,25 +17,15 @@ | |||
| #include "CarlaNative.hpp" | |||
| #if 0 | |||
| #include "CarlaMutex.hpp" | |||
| #include "CarlaString.hpp" | |||
| #include "AppConfig.h" | |||
| #include "juce_audio_formats/juce_audio_formats.h" | |||
| using namespace juce; | |||
| // ----------------------------------------------------------------------- | |||
| static AudioFormatManager& getAudioFormatManagerInstance() | |||
| { | |||
| static AudioFormatManager afm; | |||
| afm.registerBasicFormats(); | |||
| return afm; | |||
| } | |||
| // ----------------------------------------------------------------------- | |||
| class AudioFilePlugin : public NativePluginClass | |||
| { | |||
| public: | |||
| @@ -302,13 +292,15 @@ static const NativePluginDescriptor audiofileDesc = { | |||
| // ----------------------------------------------------------------------- | |||
| #endif | |||
| CARLA_EXPORT | |||
| void carla_register_native_plugin_audiofile(); | |||
| CARLA_EXPORT | |||
| void carla_register_native_plugin_audiofile() | |||
| { | |||
| carla_register_native_plugin(&audiofileDesc); | |||
| //carla_register_native_plugin(&audiofileDesc); | |||
| } | |||
| // ----------------------------------------------------------------------- | |||
| @@ -471,17 +471,10 @@ class CarlaEmbedW(QEmbedWidget): | |||
| self.addShortcutActions(self.gui.ui.menu_Settings.actions()) | |||
| self.addShortcutActions(self.gui.ui.menu_Help.actions()) | |||
| if self.host.processMode == ENGINE_PROCESS_MODE_PATCHBAY: | |||
| self.addShortcutActions(self.gui.ui.menu_Canvas.actions()) | |||
| self.addShortcutActions(self.gui.ui.menu_Canvas_Zoom.actions()) | |||
| self.addWidget(self.gui.ui.menubar) | |||
| self.addLine() | |||
| self.addWidget(self.gui.ui.toolBar) | |||
| if self.host.processMode == ENGINE_PROCESS_MODE_PATCHBAY: | |||
| self.addLine() | |||
| self.addWidget(self.gui.centralWidget()) | |||
| self.finalSetup(self.gui, winId) | |||
| @@ -571,7 +564,7 @@ if __name__ == '__main__': | |||
| # Init host backend | |||
| host = initHost("Carla-Plugin", None, False, True, True, PluginHost) | |||
| host.processMode = ENGINE_PROCESS_MODE_PATCHBAY if sys.argv[0].lower().endswith("/carla-plugin-patchbay") else ENGINE_PROCESS_MODE_CONTINUOUS_RACK | |||
| host.processMode = ENGINE_PROCESS_MODE_CONTINUOUS_RACK | |||
| host.processModeForced = True | |||
| host.nextProcessMode = host.processMode | |||
| loadHostSettings(host) | |||
| @@ -51,9 +51,7 @@ LIBS = $(MODULEDIR)/carla_engine_plugin.a | |||
| LIBS += $(MODULEDIR)/carla_plugin.a | |||
| LIBS += $(MODULEDIR)/jackbridge.a | |||
| LIBS += $(MODULEDIR)/juce_audio_basics.a | |||
| LIBS += $(MODULEDIR)/juce_audio_formats.a | |||
| LIBS += $(MODULEDIR)/juce_core.a | |||
| LIBS += $(MODULEDIR)/juce_events.a | |||
| LIBS += $(MODULEDIR)/lilv.a | |||
| LIBS += $(MODULEDIR)/native-plugins.a | |||
| LIBS += $(MODULEDIR)/rtmempool.a | |||
| @@ -66,40 +64,16 @@ ifeq ($(HAVE_HYLIA),true) | |||
| LIBS += $(MODULEDIR)/hylia.a | |||
| endif | |||
| ifeq ($(MACOS_OR_WIN32),true) | |||
| LIBS += $(MODULEDIR)/juce_audio_processors.a | |||
| LIBS += $(MODULEDIR)/juce_data_structures.a | |||
| LIBS += $(MODULEDIR)/juce_graphics.a | |||
| LIBS += $(MODULEDIR)/juce_gui_basics.a | |||
| endif | |||
| ifeq ($(MACOS),true) | |||
| LIBS += $(MODULEDIR)/juce_gui_extra.a | |||
| endif | |||
| # ---------------------------------------------------------------------------------------------------------------------------- | |||
| # Link flags | |||
| LINK_FLAGS += $(JACKBRIDGE_LIBS) | |||
| LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS) | |||
| LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS) | |||
| LINK_FLAGS += $(JUCE_CORE_LIBS) | |||
| LINK_FLAGS += $(LILV_LIBS) | |||
| LINK_FLAGS += $(NATIVE_PLUGINS_LIBS) | |||
| LINK_FLAGS += $(RTMEMPOOL_LIBS) | |||
| ifeq ($(MACOS_OR_WIN32),true) | |||
| LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS) | |||
| LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS) | |||
| LINK_FLAGS += $(JUCE_EVENTS_LIBS) | |||
| LINK_FLAGS += $(JUCE_GRAPHICS_LIBS) | |||
| LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS) | |||
| endif | |||
| ifeq ($(MACOS),true) | |||
| LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS) | |||
| endif | |||
| ifeq ($(HAVE_LIBLO),true) | |||
| LINK_FLAGS += $(LIBLO_LIBS) | |||
| endif | |||
| @@ -22,18 +22,6 @@ | |||
| #include "CarlaMathUtils.hpp" | |||
| #include "CarlaString.hpp" | |||
| #include "juce_audio_basics/juce_audio_basics.h" | |||
| #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
| # include "juce_gui_basics/juce_gui_basics.h" | |||
| #else | |||
| # include "juce_events/juce_events.h" | |||
| #endif | |||
| using juce::FloatVectorOperations; | |||
| using juce::ScopedJuceInitialiser_GUI; | |||
| using juce::SharedResourcePointer; | |||
| // ----------------------------------------------------------------------- | |||
| // -Weffc++ compat ext widget | |||
| @@ -88,8 +76,7 @@ public: | |||
| fLastPositionData(), | |||
| fURIs(), | |||
| fUI(), | |||
| fPorts(), | |||
| sJuceInitialiser() | |||
| fPorts() | |||
| { | |||
| run = extui_run; | |||
| show = extui_show; | |||
| @@ -1456,8 +1443,6 @@ private: | |||
| CARLA_DECLARE_NON_COPY_STRUCT(Ports); | |||
| } fPorts; | |||
| SharedResourcePointer<ScopedJuceInitialiser_GUI> sJuceInitialiser; | |||
| // ------------------------------------------------------------------- | |||
| #define handlePtr ((NativePlugin*)handle) | |||
| @@ -31,14 +31,7 @@ | |||
| #include "AppConfig.h" | |||
| #include "juce_core/juce_core.h" | |||
| #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
| # include "juce_gui_basics/juce_gui_basics.h" | |||
| #else | |||
| # include "juce_events/juce_events.h" | |||
| #endif | |||
| #ifdef VESTIGE_HEADER | |||
| # include "vestige/aeffectx.h" | |||
| #include "vestige/aeffectx.h" | |||
| #define effFlagsProgramChunks (1 << 5) | |||
| #define effGetParamLabel 6 | |||
| #define effGetChunk 23 | |||
| @@ -50,12 +43,6 @@ | |||
| struct ERect { | |||
| int16_t top, left, bottom, right; | |||
| }; | |||
| #else | |||
| # include "vst2/aeffectx.h" | |||
| #endif | |||
| using juce::ScopedJuceInitialiser_GUI; | |||
| using juce::SharedResourcePointer; | |||
| static uint32_t d_lastBufferSize = 0; | |||
| static double d_lastSampleRate = 0.0; | |||
| @@ -83,8 +70,7 @@ public: | |||
| fVstRect(), | |||
| fHostType(kHostTypeNull), | |||
| fMidiOutEvents(), | |||
| fStateChunk(nullptr), | |||
| sJuceInitialiser() | |||
| fStateChunk(nullptr) | |||
| { | |||
| fHost.handle = this; | |||
| fHost.uiName = carla_strdup("CarlaVST"); | |||
| @@ -640,8 +626,6 @@ private: | |||
| char* fStateChunk; | |||
| SharedResourcePointer<ScopedJuceInitialiser_GUI> sJuceInitialiser; | |||
| // ------------------------------------------------------------------- | |||
| #define handlePtr ((NativePlugin*)handle) | |||
| @@ -714,17 +698,10 @@ struct VstObject { | |||
| NativePlugin* plugin; | |||
| }; | |||
| #ifdef VESTIGE_HEADER | |||
| # define validObject effect != nullptr && effect->ptr3 != nullptr | |||
| # define validPlugin effect != nullptr && effect->ptr3 != nullptr && ((VstObject*)effect->ptr3)->plugin != nullptr | |||
| # define vstObjectPtr (VstObject*)effect->ptr3 | |||
| #else | |||
| # define validObject effect != nullptr && effect->object != nullptr | |||
| # define validPlugin effect != nullptr && effect->object != nullptr && ((VstObject*)effect->object)->plugin != nullptr | |||
| # define vstObjectPtr (VstObject*)effect->object | |||
| #endif | |||
| #define pluginPtr (vstObjectPtr)->plugin | |||
| #define validObject effect != nullptr && effect->ptr3 != nullptr | |||
| #define validPlugin effect != nullptr && effect->ptr3 != nullptr && ((VstObject*)effect->ptr3)->plugin != nullptr | |||
| #define vstObjectPtr (VstObject*)effect->ptr3 | |||
| #define pluginPtr (vstObjectPtr)->plugin | |||
| static intptr_t vst_dispatcherCallback(AEffect* effect, int32_t opcode, int32_t index, intptr_t value, void* ptr, float opt) | |||
| { | |||
| @@ -798,11 +775,7 @@ static intptr_t vst_dispatcherCallback(AEffect* effect, int32_t opcode, int32_t | |||
| /* This code invalidates the object created in VSTPluginMain | |||
| * Probably not safe against all hosts */ | |||
| obj->audioMaster = nullptr; | |||
| # ifdef VESTIGE_HEADER | |||
| effect->ptr3 = nullptr; | |||
| # else | |||
| vstObjectPtr = nullptr; | |||
| # endif | |||
| delete obj; | |||
| #endif | |||
| @@ -939,12 +912,8 @@ const AEffect* VSTPluginMain(audioMasterCallback audioMaster) | |||
| // vst fields | |||
| effect->magic = kEffectMagic; | |||
| #ifdef VESTIGE_HEADER | |||
| int32_t* const version = (int32_t*)&effect->unknown1; | |||
| *version = CARLA_VERSION_HEX; | |||
| #else | |||
| effect->version = CARLA_VERSION_HEX; | |||
| #endif | |||
| static const int32_t uniqueId = CCONST('C', 'r', 'l', 'a'); | |||
| #if CARLA_PLUGIN_SYNTH | |||
| @@ -995,11 +964,8 @@ const AEffect* VSTPluginMain(audioMasterCallback audioMaster) | |||
| VstObject* const obj(new VstObject()); | |||
| obj->audioMaster = audioMaster; | |||
| obj->plugin = nullptr; | |||
| #ifdef VESTIGE_HEADER | |||
| effect->ptr3 = obj; | |||
| #else | |||
| effect->object = obj; | |||
| #endif | |||
| effect->ptr3 = obj; | |||
| return effect; | |||
| } | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * Carla Utility Tests | |||
| * Copyright (C) 2013-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2013-2017 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * This program is free software; you can redistribute it and/or | |||
| * modify it under the terms of the GNU General Public License as | |||
| @@ -19,8 +19,6 @@ | |||
| # error Build this file with debug ON please | |||
| #endif | |||
| #define VESTIGE_HEADER | |||
| #include "CarlaLadspaUtils.hpp" | |||
| #include "CarlaDssiUtils.cpp" | |||
| #include "CarlaLv2Utils.hpp" | |||
| @@ -96,10 +96,6 @@ const char* PluginType2Str(const PluginType type) noexcept | |||
| return "PLUGIN_LV2"; | |||
| case PLUGIN_VST2: | |||
| return "PLUGIN_VST2"; | |||
| case PLUGIN_VST3: | |||
| return "PLUGIN_VST3"; | |||
| case PLUGIN_AU: | |||
| return "PLUGIN_AU"; | |||
| case PLUGIN_GIG: | |||
| return "PLUGIN_GIG"; | |||
| case PLUGIN_SF2: | |||
| @@ -362,8 +358,6 @@ const char* EngineProcessMode2Str(const EngineProcessMode mode) noexcept | |||
| return "ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS"; | |||
| case ENGINE_PROCESS_MODE_CONTINUOUS_RACK: | |||
| return "ENGINE_PROCESS_MODE_CONTINUOUS_RACK"; | |||
| case ENGINE_PROCESS_MODE_PATCHBAY: | |||
| return "ENGINE_PROCESS_MODE_PATCHBAY"; | |||
| case ENGINE_PROCESS_MODE_BRIDGE: | |||
| return "ENGINE_PROCESS_MODE_BRIDGE"; | |||
| } | |||
| @@ -484,10 +478,6 @@ const char* getPluginTypeAsString(const PluginType type) noexcept | |||
| return "LV2"; | |||
| case PLUGIN_VST2: | |||
| return "VST2"; | |||
| case PLUGIN_VST3: | |||
| return "VST3"; | |||
| case PLUGIN_AU: | |||
| return "AU";; | |||
| case PLUGIN_GIG: | |||
| return "GIG"; | |||
| case PLUGIN_SF2: | |||
| @@ -527,10 +517,6 @@ PluginType getPluginTypeFromString(const char* const ctype) noexcept | |||
| return PLUGIN_LV2; | |||
| if (stype == "vst2" || stype == "vst") | |||
| return PLUGIN_VST2; | |||
| if (stype == "vst3") | |||
| return PLUGIN_VST3; | |||
| if (stype == "au" || stype == "audiounit") | |||
| return PLUGIN_AU; | |||
| if (stype == "gig") | |||
| return PLUGIN_GIG; | |||
| if (stype == "sf2") | |||
| @@ -44,8 +44,6 @@ const char* EngineType2Str(const EngineType type) noexcept | |||
| return "kEngineTypeNull"; | |||
| case kEngineTypeJack: | |||
| return "kEngineTypeJack"; | |||
| case kEngineTypeJuce: | |||
| return "kEngineTypeJuce"; | |||
| case kEngineTypeRtAudio: | |||
| return "kEngineTypeRtAudio"; | |||
| case kEngineTypePlugin: | |||
| @@ -1,31 +0,0 @@ | |||
| /* | |||
| * Mini version of juce_audio_processors | |||
| * Copyright (C) 2014-2017 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * This program is free software; you can redistribute it and/or | |||
| * modify it under the terms of the GNU General Public License as | |||
| * published by the Free Software Foundation; either version 2 of | |||
| * the License, or any later version. | |||
| * | |||
| * This program is distributed in the hope that it will be useful, | |||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| * GNU General Public License for more details. | |||
| * | |||
| * For a full copy of the GNU General Public License see the doc/GPL.txt file. | |||
| */ | |||
| #include "CarlaDefines.h" | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| #if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)) | |||
| #undef KeyPress | |||
| #include "juce_audio_processors/juce_audio_processors.h" | |||
| #include "juce_audio_processors/processors/juce_AudioProcessor.cpp" | |||
| #include "juce_audio_processors/processors/juce_AudioProcessorGraph.cpp" | |||
| #include "juce_audio_processors/utilities/juce_AudioProcessorParameters.cpp" | |||
| #endif // ! CARLA_OS_MAC || CARLA_OS_WIN | |||
| @@ -522,13 +522,6 @@ void CarlaStateSave::dumpToMemoryStream(MemoryOutputStream& content) const | |||
| infoXml << " <Binary>" << xmlSafeString(binary, true) << "</Binary>\n"; | |||
| infoXml << " <UniqueID>" << juce::int64(uniqueId) << "</UniqueID>\n"; | |||
| break; | |||
| case PLUGIN_VST3: | |||
| infoXml << " <Binary>" << xmlSafeString(binary, true) << "</Binary>\n"; | |||
| infoXml << " <Label>" << xmlSafeString(label, true) << "</Label>\n"; | |||
| break; | |||
| case PLUGIN_AU: | |||
| infoXml << " <Identifier>" << xmlSafeString(label, true) << "</Identifier>\n"; | |||
| break; | |||
| case PLUGIN_GIG: | |||
| case PLUGIN_SF2: | |||
| infoXml << " <Filename>" << xmlSafeString(binary, true) << "</Filename>\n"; | |||
| @@ -34,7 +34,6 @@ | |||
| #define VST_2_4_EXTENSIONS 1 | |||
| #define VST_FORCE_DEPRECATED 0 | |||
| #ifdef VESTIGE_HEADER | |||
| #include "vestige/aeffectx.h" | |||
| #define audioMasterGetOutputSpeakerArrangement audioMasterGetSpeakerArrangement | |||
| #define effFlagsProgramChunks (1 << 5) | |||
| @@ -110,18 +109,6 @@ | |||
| struct ERect { | |||
| int16_t top, left, bottom, right; | |||
| }; | |||
| #else | |||
| #ifdef CARLA_OS_MAC | |||
| # undef __ppc__ | |||
| # define __ppc__ 0 | |||
| #else | |||
| # undef TARGET_API_MAC_CARBON | |||
| # define TARGET_API_MAC_CARBON 0 | |||
| #endif | |||
| #undef VST_64BIT_PLATFORM | |||
| #define VST_64BIT_PLATFORM (defined(_WIN64) || defined(__LP64__) || defined (_LP64)) | |||
| #include "vst2/pluginterfaces/vst2.x/aeffectx.h" | |||
| #endif | |||
| // ----------------------------------------------------------------------- | |||
| // Plugin callback | |||
| @@ -200,9 +200,7 @@ class RackListWidget(QListWidget): | |||
| # FIXME not for disabled bridges | |||
| exts.append(".dll") | |||
| if MACOS or WINDOWS: | |||
| exts.append(".vst3") | |||
| else: | |||
| if not (MACOS or WINDOWS): | |||
| exts.append(".so") | |||
| self.fSupportedExtensions = tuple(i.replace("*","").lower() for i in exts) | |||
| @@ -244,7 +242,7 @@ class RackListWidget(QListWidget): | |||
| if os.path.isdir(filename): | |||
| #if os.path.exists(os.path.join(filename, "manifest.ttl")): | |||
| #return True | |||
| if MACOS and filename.lower().endswith((".vst", ".vst3")): | |||
| if MACOS and filename.lower().endswith(".vst"): | |||
| return True | |||
| elif os.path.isfile(filename): | |||