Browse Source

Make sure to tell plugin about CLAP UI param changes

pull/321/merge
falkTX 3 years ago
parent
commit
94428d3603
2 changed files with 11 additions and 3 deletions
  1. +7
    -1
      Makefile.plugins.mk
  2. +4
    -2
      distrho/src/DistrhoPluginCLAP.cpp

+ 7
- 1
Makefile.plugins.mk View File

@@ -544,6 +544,12 @@ endif
# ---------------------------------------------------------------------------------------------------------------------
# CLAP

ifeq ($(HAIKU_OR_MACOS_OR_WASM_OR_WINDOWS),true)
ifeq ($(HAVE_DGL),true)
CLAP_LIBS = -lpthread
endif
endif

clap: $(clap) $(clapfiles)

ifeq ($(HAVE_DGL),true)
@@ -553,7 +559,7 @@ $(clap): $(OBJS_DSP) $(BUILD_DIR)/DistrhoPluginMain_CLAP.cpp.o
endif
-@mkdir -p $(shell dirname $@)
@echo "Creating CLAP plugin for $(NAME)"
$(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(EXTRA_LIBS) $(DGL_LIBS) $(SHARED) $(SYMBOLS_CLAP) -o $@
$(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(EXTRA_LIBS) $(DGL_LIBS) $(CLAP_LIBS) $(SHARED) $(SYMBOLS_CLAP) -o $@

# ---------------------------------------------------------------------------------------------------------------------
# Shared


+ 4
- 2
distrho/src/DistrhoPluginCLAP.cpp View File

@@ -45,6 +45,7 @@ struct ClapEventQueue
struct Event {
EventType type;
uint32_t index;
float plain;
double value;
};

@@ -346,7 +347,7 @@ private:
{
const ClapEventQueue::Event ev = {
started ? ClapEventQueue::kEventGestureBegin : ClapEventQueue::kEventGestureBegin,
rindex, 0.0
rindex, 0.f, 0.0
};
fEventQueue.addEventFromUI(ev);
}
@@ -366,7 +367,7 @@ private:

const ClapEventQueue::Event ev = {
ClapEventQueue::kEventParamSet,
rindex, value
rindex, plain, value
};
fEventQueue.addEventFromUI(ev);
}
@@ -513,6 +514,7 @@ public:
clapEvent.header.type = CLAP_EVENT_PARAM_VALUE;
clapEvent.param_id = event.index;
clapEvent.value = event.value;
fPlugin.setParameterValue(event.index, event.plain);
break;
default:
continue;


Loading…
Cancel
Save