Browse Source

carla-native: add PingPongPan

tags/v0.9.0
falkTX 12 years ago
parent
commit
d21570bd38
5 changed files with 28 additions and 2 deletions
  1. +4
    -0
      c++/carla-native/Makefile
  2. +1
    -0
      c++/carla-native/carla_native.h
  3. +6
    -0
      c++/carla-native/distrho/DistrhoPluginCarla.cpp
  4. +15
    -0
      c++/carla-plugin/native.cpp
  5. +2
    -2
      c++/distrho-plugin-toolkit/src/DistrhoUIOpenGLExt.cpp

+ 4
- 0
c++/carla-native/Makefile View File

@@ -29,6 +29,7 @@ OBJS = \
OBJS += \
distrho-3bandeq.o \
distrho-3bandsplitter.o \
distrho-pingpongpan.o \
distrho-pugl.o

# ZynAddSubFX
@@ -56,6 +57,9 @@ distrho-3bandeq.o: distrho-3bandeq.cpp
distrho-3bandsplitter.o: distrho-3bandsplitter.cpp
$(CXX) -c $< $(BUILD_CXX_FLAGS) -I../distrho-plugin-toolkit -I3bandsplitter -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -o $@

distrho-pingpongpan.o: distrho-pingpongpan.cpp
$(CXX) -c $< $(BUILD_CXX_FLAGS) -I../distrho-plugin-toolkit -Ipingpongpan -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -o $@

distrho-pugl.o: distrho-pugl.cpp
$(CXX) -c $< $(BUILD_CXX_FLAGS) -I../distrho-plugin-toolkit -o $@



+ 1
- 0
c++/carla-native/carla_native.h View File

@@ -191,6 +191,7 @@ void carla_register_native_plugin_midiSplit();
// DISTRHO plugins
void carla_register_native_plugin_3BandEQ();
void carla_register_native_plugin_3BandSplitter();
void carla_register_native_plugin_PingPongPan();

#ifdef WANT_ZYNADDSUBFX
// ZynAddSubFX


+ 6
- 0
c++/carla-native/distrho/DistrhoPluginCarla.cpp View File

@@ -130,6 +130,12 @@ protected:
setFixedSize(width, height);
}

void closeEvent(QCloseEvent* event)
{
m_host->ui_closed(m_host->handle);
QDialog::closeEvent(event);
}

private:
// Plugin stuff
const HostDescriptor* const m_host;


+ 15
- 0
c++/carla-plugin/native.cpp View File

@@ -51,6 +51,7 @@ public:
host.write_midi_event = carla_host_write_midi_event;
host.ui_parameter_changed = carla_host_ui_parameter_changed;
host.ui_custom_data_changed = carla_host_ui_custom_data_changed;
host.ui_closed = carla_host_ui_closed;

isProcessing = false;

@@ -1481,6 +1482,13 @@ public:
setCustomData(CUSTOM_DATA_STRING, key, value, false);
}

void handleUiClosed()
{
x_engine->callback(CALLBACK_SHOW_GUI, m_id, 0, 0, 0.0, nullptr);
}

// -------------------------------------------------------------------

static uint32_t carla_host_get_buffer_size(HostHandle handle)
{
CARLA_ASSERT(handle);
@@ -1517,6 +1525,12 @@ public:
((NativePlugin*)handle)->handleUiCustomDataChanged(key, value);
}

static void carla_host_ui_closed(HostHandle handle)
{
CARLA_ASSERT(handle);
((NativePlugin*)handle)->handleUiClosed();
}

// -------------------------------------------------------------------

static size_t getPluginCount()
@@ -1552,6 +1566,7 @@ public:

carla_register_native_plugin_3BandEQ();
carla_register_native_plugin_3BandSplitter();
carla_register_native_plugin_PingPongPan();

#ifdef WANT_ZYNADDSUBFX
carla_register_native_plugin_zynaddsubfx();


+ 2
- 2
c++/distrho-plugin-toolkit/src/DistrhoUIOpenGLExt.cpp View File

@@ -1176,7 +1176,7 @@ void OpenGLExtUI::d_onMotion(int x, int y)

if (movX != 0)
{
int d = (d_uiGetModifiers() & MOD_SHIFT) ? 2000 : 200;
int d = (d_uiGetModifiers() & MODIFIER_SHIFT) ? 2000 : 200;
float value = knob->_value + (knob->_max - knob->_min) / d * movX;

if (value < knob->_min)
@@ -1199,7 +1199,7 @@ void OpenGLExtUI::d_onMotion(int x, int y)

if (movY != 0)
{
int d = (d_uiGetModifiers() & MOD_SHIFT) ? 2000 : 200;
int d = (d_uiGetModifiers() & MODIFIER_SHIFT) ? 2000 : 200;
float value = knob->_value + (knob->_max - knob->_min) / d * movY;

if (value < knob->_min)


Loading…
Cancel
Save