| @@ -30,7 +30,7 @@ | |||||
| <item row="2" column="0"> | <item row="2" column="0"> | ||||
| <widget class="QGroupBox" name="groupBox_3"> | <widget class="QGroupBox" name="groupBox_3"> | ||||
| <property name="title"> | <property name="title"> | ||||
| <string>Control?</string> | |||||
| <string>Control</string> | |||||
| </property> | </property> | ||||
| <layout class="QVBoxLayout" name="verticalLayout_5"> | <layout class="QVBoxLayout" name="verticalLayout_5"> | ||||
| <item> | <item> | ||||
| @@ -655,7 +655,7 @@ Plugin Name | |||||
| </widget> | </widget> | ||||
| </item> | </item> | ||||
| <item row="2" column="0"> | <item row="2" column="0"> | ||||
| <widget class="QLabel" name="label_4"> | |||||
| <widget class="QLabel" name="label_label"> | |||||
| <property name="text"> | <property name="text"> | ||||
| <string>Label/URI:</string> | <string>Label/URI:</string> | ||||
| </property> | </property> | ||||
| @@ -665,7 +665,7 @@ Plugin Name | |||||
| </widget> | </widget> | ||||
| </item> | </item> | ||||
| <item row="1" column="0"> | <item row="1" column="0"> | ||||
| <widget class="QLabel" name="label_3"> | |||||
| <widget class="QLabel" name="label_name"> | |||||
| <property name="text"> | <property name="text"> | ||||
| <string>Name:</string> | <string>Name:</string> | ||||
| </property> | </property> | ||||
| @@ -755,7 +755,7 @@ Plugin Name | |||||
| </widget> | </widget> | ||||
| </item> | </item> | ||||
| <item row="0" column="0"> | <item row="0" column="0"> | ||||
| <widget class="QLabel" name="label_5"> | |||||
| <widget class="QLabel" name="label_type"> | |||||
| <property name="text"> | <property name="text"> | ||||
| <string>Type:</string> | <string>Type:</string> | ||||
| </property> | </property> | ||||
| @@ -765,7 +765,7 @@ Plugin Name | |||||
| </widget> | </widget> | ||||
| </item> | </item> | ||||
| <item row="3" column="0"> | <item row="3" column="0"> | ||||
| <widget class="QLabel" name="label_6"> | |||||
| <widget class="QLabel" name="label_maker"> | |||||
| <property name="text"> | <property name="text"> | ||||
| <string>Maker:</string> | <string>Maker:</string> | ||||
| </property> | </property> | ||||
| @@ -775,7 +775,7 @@ Plugin Name | |||||
| </widget> | </widget> | ||||
| </item> | </item> | ||||
| <item row="4" column="0"> | <item row="4" column="0"> | ||||
| <widget class="QLabel" name="label_7"> | |||||
| <widget class="QLabel" name="label_copyright"> | |||||
| <property name="text"> | <property name="text"> | ||||
| <string>Copyright:</string> | <string>Copyright:</string> | ||||
| </property> | </property> | ||||
| @@ -785,7 +785,7 @@ Plugin Name | |||||
| </widget> | </widget> | ||||
| </item> | </item> | ||||
| <item row="5" column="0"> | <item row="5" column="0"> | ||||
| <widget class="QLabel" name="label_8"> | |||||
| <widget class="QLabel" name="label_unique_id"> | |||||
| <property name="text"> | <property name="text"> | ||||
| <string>Unique ID:</string> | <string>Unique ID:</string> | ||||
| </property> | </property> | ||||
| @@ -887,7 +887,6 @@ Plugin Name | |||||
| <height>64</height> | <height>64</height> | ||||
| </size> | </size> | ||||
| </property> | </property> | ||||
| <zorder>tabWidget</zorder> | |||||
| </widget> | </widget> | ||||
| </item> | </item> | ||||
| </layout> | </layout> | ||||
| @@ -1731,47 +1731,45 @@ void CarlaEngine::processRack(float* inBufReal[2], float* outBuf[2], const uint3 | |||||
| if (processed) | if (processed) | ||||
| { | { | ||||
| // initialize inputs (from previous outputs) | // initialize inputs (from previous outputs) | ||||
| carla_copyFloat(inBuf0, outBuf[0], frames); | carla_copyFloat(inBuf0, outBuf[0], frames); | ||||
| carla_copyFloat(inBuf1, outBuf[1], frames); | carla_copyFloat(inBuf1, outBuf[1], frames); | ||||
| std::memcpy(pData->bufEvents.in, pData->bufEvents.out, sizeof(EngineEvent)*kEngineMaxInternalEventCount); | |||||
| // initialize outputs (zero) | // initialize outputs (zero) | ||||
| carla_zeroFloat(outBuf[0], frames); | carla_zeroFloat(outBuf[0], frames); | ||||
| carla_zeroFloat(outBuf[1], frames); | carla_zeroFloat(outBuf[1], frames); | ||||
| carla_zeroMem(pData->bufEvents.out, sizeof(EngineEvent)*kEngineMaxInternalEventCount); | |||||
| } | |||||
| oldAudioInCount = plugin->getAudioInCount(); | |||||
| oldMidiOutCount = plugin->getMidiOutCount(); | |||||
| // if plugin has no audio inputs, add input buffer | |||||
| //if (oldAudioInCount == 0) | |||||
| { | |||||
| carla_addFloat(outBuf[0], inBuf0, frames); | |||||
| carla_addFloat(outBuf[1], inBuf1, frames); | |||||
| } | |||||
| // if plugin has no midi out, add previous events | // if plugin has no midi out, add previous events | ||||
| if (oldMidiOutCount == 0 && pData->bufEvents.in[0].type != CarlaBackend::kEngineEventTypeNull) | if (oldMidiOutCount == 0 && pData->bufEvents.in[0].type != CarlaBackend::kEngineEventTypeNull) | ||||
| { | { | ||||
| if (pData->bufEvents.out[0].type != CarlaBackend::kEngineEventTypeNull) | if (pData->bufEvents.out[0].type != CarlaBackend::kEngineEventTypeNull) | ||||
| { | { | ||||
| // TODO: carefully add to output, sorted events | |||||
| } | |||||
| else | |||||
| { | |||||
| // nothing in output, can be replaced directly | |||||
| std::memcpy(pData->bufEvents.out, pData->bufEvents.in, sizeof(EngineEvent)*kEngineMaxInternalEventCount); | |||||
| // TODO: carefully add to input, sorted events | |||||
| } | } | ||||
| // else nothing needed | |||||
| } | } | ||||
| else | |||||
| { | |||||
| // initialize input from previous output and zero output | |||||
| std::memcpy(pData->bufEvents.in, pData->bufEvents.out, sizeof(EngineEvent)*kEngineMaxInternalEventCount); | |||||
| std::memset(pData->bufEvents.out, 0, sizeof(EngineEvent)*kEngineMaxInternalEventCount); | |||||
| } | |||||
| } | |||||
| oldAudioInCount = plugin->getAudioInCount(); | |||||
| oldMidiOutCount = plugin->getMidiOutCount(); | |||||
| // process | // process | ||||
| plugin->initBuffers(); | plugin->initBuffers(); | ||||
| plugin->process(inBuf, outBuf, frames); | plugin->process(inBuf, outBuf, frames); | ||||
| plugin->unlock(); | plugin->unlock(); | ||||
| // if plugin has no audio inputs, add input buffer | |||||
| if (oldAudioInCount == 0) | |||||
| { | |||||
| carla_addFloat(outBuf[0], inBuf0, frames); | |||||
| carla_addFloat(outBuf[1], inBuf1, frames); | |||||
| } | |||||
| // set peaks | // set peaks | ||||
| { | { | ||||
| float inPeak1 = 0.0f; | float inPeak1 = 0.0f; | ||||
| @@ -557,9 +557,6 @@ public: | |||||
| #ifdef BUILD_BRIDGE | #ifdef BUILD_BRIDGE | ||||
| fHasQuit(false) | fHasQuit(false) | ||||
| #else | #else | ||||
| # ifdef CARLA_PROPER_CPP11_SUPPORT | |||||
| fRackPorts{nullptr}, | |||||
| # endif | |||||
| fLastGroupId(0), | fLastGroupId(0), | ||||
| fLastPortId(0), | fLastPortId(0), | ||||
| fLastConnectionId(0) | fLastConnectionId(0) | ||||
| @@ -570,9 +567,7 @@ public: | |||||
| #ifdef BUILD_BRIDGE | #ifdef BUILD_BRIDGE | ||||
| fOptions.processMode = PROCESS_MODE_MULTIPLE_CLIENTS; | fOptions.processMode = PROCESS_MODE_MULTIPLE_CLIENTS; | ||||
| #else | #else | ||||
| # ifndef CARLA_PROPER_CPP11_SUPPORT | |||||
| carla_fill<jack_port_t*>(fRackPorts, kRackPortCount, nullptr); | carla_fill<jack_port_t*>(fRackPorts, kRackPortCount, nullptr); | ||||
| # endif | |||||
| #endif | #endif | ||||
| // FIXME: Always enable JACK transport for now | // FIXME: Always enable JACK transport for now | ||||
| @@ -724,6 +719,7 @@ public: | |||||
| jackbridge_port_unregister(fClient, fRackPorts[kRackPortAudioOut2]); | jackbridge_port_unregister(fClient, fRackPorts[kRackPortAudioOut2]); | ||||
| jackbridge_port_unregister(fClient, fRackPorts[kRackPortEventIn]); | jackbridge_port_unregister(fClient, fRackPorts[kRackPortEventIn]); | ||||
| jackbridge_port_unregister(fClient, fRackPorts[kRackPortEventOut]); | jackbridge_port_unregister(fClient, fRackPorts[kRackPortEventOut]); | ||||
| carla_fill<jack_port_t*>(fRackPorts, kRackPortCount, nullptr); | |||||
| } | } | ||||
| if (jackbridge_client_close(fClient)) | if (jackbridge_client_close(fClient)) | ||||
| @@ -547,16 +547,61 @@ class PluginEdit(QDialog): | |||||
| else: | else: | ||||
| self.ui.le_type.setText(self.tr("Unknown")) | self.ui.le_type.setText(self.tr("Unknown")) | ||||
| self.ui.le_name.setText(pluginName) | |||||
| self.ui.le_name.setToolTip(pluginName) | |||||
| self.ui.le_label.setText(self.fPluginInfo['label']) | |||||
| self.ui.le_label.setToolTip(self.fPluginInfo['label']) | |||||
| self.ui.le_maker.setText(self.fPluginInfo['maker']) | |||||
| self.ui.le_maker.setToolTip(self.fPluginInfo['maker']) | |||||
| self.ui.le_copyright.setText(self.fPluginInfo['copyright']) | |||||
| self.ui.le_copyright.setToolTip(self.fPluginInfo['copyright']) | |||||
| self.ui.le_unique_id.setText(str(self.fPluginInfo['uniqueId'])) | |||||
| self.ui.le_unique_id.setToolTip(str(self.fPluginInfo['uniqueId'])) | |||||
| if pluginName: | |||||
| self.ui.label_name.setEnabled(True) | |||||
| self.ui.le_name.setEnabled(True) | |||||
| self.ui.le_name.setText(pluginName) | |||||
| self.ui.le_name.setToolTip(pluginName) | |||||
| else: | |||||
| self.ui.label_name.setEnabled(False) | |||||
| self.ui.le_name.setEnabled(False) | |||||
| self.ui.le_name.setText("") | |||||
| self.ui.le_name.setToolTip("") | |||||
| if self.fPluginInfo['label']: | |||||
| self.ui.label_label.setEnabled(True) | |||||
| self.ui.le_label.setEnabled(True) | |||||
| self.ui.le_label.setText(self.fPluginInfo['label']) | |||||
| self.ui.le_label.setToolTip(self.fPluginInfo['label']) | |||||
| else: | |||||
| self.ui.label_label.setEnabled(False) | |||||
| self.ui.le_label.setEnabled(False) | |||||
| self.ui.le_label.setText("") | |||||
| self.ui.le_label.setToolTip("") | |||||
| if self.fPluginInfo['maker']: | |||||
| self.ui.label_maker.setEnabled(True) | |||||
| self.ui.le_maker.setEnabled(True) | |||||
| self.ui.le_maker.setText(self.fPluginInfo['maker']) | |||||
| self.ui.le_maker.setToolTip(self.fPluginInfo['maker']) | |||||
| else: | |||||
| self.ui.label_maker.setEnabled(False) | |||||
| self.ui.le_maker.setEnabled(False) | |||||
| self.ui.le_maker.setText("") | |||||
| self.ui.le_maker.setToolTip("") | |||||
| if self.fPluginInfo['copyright']: | |||||
| self.ui.label_copyright.setEnabled(True) | |||||
| self.ui.le_copyright.setEnabled(True) | |||||
| self.ui.le_copyright.setText(self.fPluginInfo['copyright']) | |||||
| self.ui.le_copyright.setToolTip(self.fPluginInfo['copyright']) | |||||
| else: | |||||
| self.ui.label_copyright.setEnabled(False) | |||||
| self.ui.le_copyright.setEnabled(False) | |||||
| self.ui.le_copyright.setText("") | |||||
| self.ui.le_copyright.setToolTip("") | |||||
| if self.fPluginInfo['uniqueId'] != 0: | |||||
| self.ui.label_unique_id.setEnabled(True) | |||||
| self.ui.le_unique_id.setEnabled(True) | |||||
| self.ui.le_unique_id.setText(str(self.fPluginInfo['uniqueId'])) | |||||
| self.ui.le_unique_id.setToolTip(str(self.fPluginInfo['uniqueId'])) | |||||
| else: | |||||
| self.ui.label_unique_id.setEnabled(False) | |||||
| self.ui.le_unique_id.setEnabled(False) | |||||
| self.ui.le_unique_id.setText("") | |||||
| self.ui.le_unique_id.setToolTip("") | |||||
| self.ui.label_plugin.setText("\n%s\n" % self.fPluginInfo['name']) | self.ui.label_plugin.setText("\n%s\n" % self.fPluginInfo['name']) | ||||
| self.setWindowTitle(self.fPluginInfo['name']) | self.setWindowTitle(self.fPluginInfo['name']) | ||||