Browse Source

UI tweaks; Fix rack processing

tags/1.9.4
falkTX 11 years ago
parent
commit
1d972a8200
4 changed files with 81 additions and 43 deletions
  1. +7
    -8
      resources/ui/carla_edit.ui
  2. +18
    -20
      source/backend/engine/CarlaEngine.cpp
  3. +1
    -5
      source/backend/engine/CarlaEngineJack.cpp
  4. +55
    -10
      source/carla_widgets.py

+ 7
- 8
resources/ui/carla_edit.ui View File

@@ -30,7 +30,7 @@
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Control?</string>
<string>Control</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
@@ -655,7 +655,7 @@ Plugin Name
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<widget class="QLabel" name="label_label">
<property name="text">
<string>Label/URI:</string>
</property>
@@ -665,7 +665,7 @@ Plugin Name
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<widget class="QLabel" name="label_name">
<property name="text">
<string>Name:</string>
</property>
@@ -755,7 +755,7 @@ Plugin Name
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<widget class="QLabel" name="label_type">
<property name="text">
<string>Type:</string>
</property>
@@ -765,7 +765,7 @@ Plugin Name
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_6">
<widget class="QLabel" name="label_maker">
<property name="text">
<string>Maker:</string>
</property>
@@ -775,7 +775,7 @@ Plugin Name
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_7">
<widget class="QLabel" name="label_copyright">
<property name="text">
<string>Copyright:</string>
</property>
@@ -785,7 +785,7 @@ Plugin Name
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_8">
<widget class="QLabel" name="label_unique_id">
<property name="text">
<string>Unique ID:</string>
</property>
@@ -887,7 +887,6 @@ Plugin Name
<height>64</height>
</size>
</property>
<zorder>tabWidget</zorder>
</widget>
</item>
</layout>


+ 18
- 20
source/backend/engine/CarlaEngine.cpp View File

@@ -1731,47 +1731,45 @@ void CarlaEngine::processRack(float* inBufReal[2], float* outBuf[2], const uint3

if (processed)
{

// initialize inputs (from previous outputs)
carla_copyFloat(inBuf0, outBuf[0], frames);
carla_copyFloat(inBuf1, outBuf[1], frames);
std::memcpy(pData->bufEvents.in, pData->bufEvents.out, sizeof(EngineEvent)*kEngineMaxInternalEventCount);

// initialize outputs (zero)
carla_zeroFloat(outBuf[0], 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 (oldMidiOutCount == 0 && pData->bufEvents.in[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
plugin->initBuffers();
plugin->process(inBuf, outBuf, frames);
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
{
float inPeak1 = 0.0f;


+ 1
- 5
source/backend/engine/CarlaEngineJack.cpp View File

@@ -557,9 +557,6 @@ public:
#ifdef BUILD_BRIDGE
fHasQuit(false)
#else
# ifdef CARLA_PROPER_CPP11_SUPPORT
fRackPorts{nullptr},
# endif
fLastGroupId(0),
fLastPortId(0),
fLastConnectionId(0)
@@ -570,9 +567,7 @@ public:
#ifdef BUILD_BRIDGE
fOptions.processMode = PROCESS_MODE_MULTIPLE_CLIENTS;
#else
# ifndef CARLA_PROPER_CPP11_SUPPORT
carla_fill<jack_port_t*>(fRackPorts, kRackPortCount, nullptr);
# endif
#endif

// FIXME: Always enable JACK transport for now
@@ -724,6 +719,7 @@ public:
jackbridge_port_unregister(fClient, fRackPorts[kRackPortAudioOut2]);
jackbridge_port_unregister(fClient, fRackPorts[kRackPortEventIn]);
jackbridge_port_unregister(fClient, fRackPorts[kRackPortEventOut]);
carla_fill<jack_port_t*>(fRackPorts, kRackPortCount, nullptr);
}

if (jackbridge_client_close(fClient))


+ 55
- 10
source/carla_widgets.py View File

@@ -547,16 +547,61 @@ class PluginEdit(QDialog):
else:
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.setWindowTitle(self.fPluginInfo['name'])



Loading…
Cancel
Save