diff --git a/ptap/Makefile b/ptap/Makefile index e8002b7..7ab69ce 100644 --- a/ptap/Makefile +++ b/ptap/Makefile @@ -2,30 +2,24 @@ CFLAGS := -Wall -O3 -g -D_GNU_SOURCE LDFLAGS := -lm CFLAGS += `pkg-config lv2core --cflags` -LDFLAGS += `pkg-config lv2ore --libs` +LDFLAGS += `pkg-config lv2core --libs` PTAPSRC := ptap.c +PTAPSRC += ptapui.c PTAPOBJ := $(PTAPSRC:.c=.o) PTAPO := ptap.so -DUCKERSRC := ducker.c -DUCKEROBJ := $(DUCKERSRC:.c=.o) -DUCKERO := ducker.so - -all: $(PTAPO) $(DUCKERO) +all: $(PTAPO) clean: - rm $(PTAPOBJ) $(PTAPO) $(DUCKEROBJ) $(DUCKERO) + rm $(PTAPOBJ) $(PTAPO) depend: - makedepend $(PTAPSRC) $(DUCKERSRC) + makedepend $(PTAPSRC) $(PTAPO): $(PTAPOBJ) $(CC) -shared -fPIC -Wl,-soname,$(PTAPO) $(PTAPOBJ) -o $@ -$(DUCKERO): $(DUCKEROBJ) - $(CC) -shared -fPIC -Wl,-soname,$(DUCKERO) $(DUCKEROBJ) -o $@ - .c.o: $(CC) -c -fPIC $(CFLAGS) $< -o $@ diff --git a/ptap/ptapui.c b/ptap/ptapui.c new file mode 100644 index 0000000..a2484ec --- /dev/null +++ b/ptap/ptapui.c @@ -0,0 +1,49 @@ +#include +#include +#include +#include +#include +#include + +static LV2UI_Handle ptapui_instantiate( + const LV2UI_Descriptor *descriptor, + const char *plugin_uri, + const char *bundle_path, + LV2UI_Write_Function write_function, + LV2UI_Controller controller, + LV2UI_Widget *widget, + const LV2_Feature *const *host_features) +{ + return NULL; +} + +static void ptapui_cleanup(LV2UI_Handle ui) +{ +} + +static void ptapui_port_event( + LV2UI_Handle ui, + uint32_t port_index, + uint32_t buffer_size, + uint32_t format, + const void *buffer) +{ +} + +static const LV2UI_Descriptor s_lv2uidescriptor = +{ + .URI = "http://fuzzle.org/~petern/ptapui/1", + .instantiate = &ptapui_instantiate, + .cleanup = &ptapui_cleanup, + .port_event = &ptapui_port_event, + .extension_data = NULL, +}; + +const LV2UI_Descriptor *lv2ui_descriptor(uint32_t index) +{ + if (index == 0) { + return &s_lv2uidescriptor; + } + + return NULL; +}