Start of ptap UI
parent
c8fcc8e778
commit
4d16160270
|
@ -2,30 +2,24 @@ CFLAGS := -Wall -O3 -g -D_GNU_SOURCE
|
||||||
LDFLAGS := -lm
|
LDFLAGS := -lm
|
||||||
|
|
||||||
CFLAGS += `pkg-config lv2core --cflags`
|
CFLAGS += `pkg-config lv2core --cflags`
|
||||||
LDFLAGS += `pkg-config lv2ore --libs`
|
LDFLAGS += `pkg-config lv2core --libs`
|
||||||
|
|
||||||
PTAPSRC := ptap.c
|
PTAPSRC := ptap.c
|
||||||
|
PTAPSRC += ptapui.c
|
||||||
PTAPOBJ := $(PTAPSRC:.c=.o)
|
PTAPOBJ := $(PTAPSRC:.c=.o)
|
||||||
PTAPO := ptap.so
|
PTAPO := ptap.so
|
||||||
|
|
||||||
DUCKERSRC := ducker.c
|
all: $(PTAPO)
|
||||||
DUCKEROBJ := $(DUCKERSRC:.c=.o)
|
|
||||||
DUCKERO := ducker.so
|
|
||||||
|
|
||||||
all: $(PTAPO) $(DUCKERO)
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm $(PTAPOBJ) $(PTAPO) $(DUCKEROBJ) $(DUCKERO)
|
rm $(PTAPOBJ) $(PTAPO)
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
makedepend $(PTAPSRC) $(DUCKERSRC)
|
makedepend $(PTAPSRC)
|
||||||
|
|
||||||
$(PTAPO): $(PTAPOBJ)
|
$(PTAPO): $(PTAPOBJ)
|
||||||
$(CC) -shared -fPIC -Wl,-soname,$(PTAPO) $(PTAPOBJ) -o $@
|
$(CC) -shared -fPIC -Wl,-soname,$(PTAPO) $(PTAPOBJ) -o $@
|
||||||
|
|
||||||
$(DUCKERO): $(DUCKEROBJ)
|
|
||||||
$(CC) -shared -fPIC -Wl,-soname,$(DUCKERO) $(DUCKEROBJ) -o $@
|
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c -fPIC $(CFLAGS) $< -o $@
|
$(CC) -c -fPIC $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <lv2.h>
|
||||||
|
#include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
Loading…
Reference in New Issue