win32 fixes
This commit is contained in:
parent
c741ef87f3
commit
7a7850d88b
3 changed files with 15 additions and 2 deletions
2
Makefile
2
Makefile
|
@ -12,7 +12,7 @@ SRC = ${OBJ:.o=.c}
|
||||||
PLACEBO_FLAGS = -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math
|
PLACEBO_FLAGS = -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math
|
||||||
ALL_CFLAGS = -O3 ${PLACEBO_FLAGS} -std=c99 -fPIC -Wall ${CFLAGS}
|
ALL_CFLAGS = -O3 ${PLACEBO_FLAGS} -std=c99 -fPIC -Wall ${CFLAGS}
|
||||||
ALL_LDFLAGS = -lm ${LDFLAGS}
|
ALL_LDFLAGS = -lm ${LDFLAGS}
|
||||||
SHARED_LDFLAGS = -nostartfiles -shared
|
SHARED_LDFLAGS = -shared
|
||||||
|
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
EXEC_PREFIX ?= ${PREFIX}
|
EXEC_PREFIX ?= ${PREFIX}
|
||||||
|
|
|
@ -26,6 +26,9 @@ typedef unsigned long ulong;
|
||||||
#define BW_MIN 0.02
|
#define BW_MIN 0.02
|
||||||
#define BW_MAX 8
|
#define BW_MAX 8
|
||||||
|
|
||||||
|
static int ready = 0;
|
||||||
|
void _init();
|
||||||
|
|
||||||
LADSPA_PortDescriptor p_discs[PCOUNT];
|
LADSPA_PortDescriptor p_discs[PCOUNT];
|
||||||
LADSPA_PortRangeHint p_hints[PCOUNT];
|
LADSPA_PortRangeHint p_hints[PCOUNT];
|
||||||
const char *p_names[PCOUNT];
|
const char *p_names[PCOUNT];
|
||||||
|
@ -59,8 +62,10 @@ typedef struct {
|
||||||
LADSPA_Data run_adding_gain;
|
LADSPA_Data run_adding_gain;
|
||||||
} eq_t;
|
} eq_t;
|
||||||
|
|
||||||
const LADSPA_Descriptor *
|
DLL_EXPORT const LADSPA_Descriptor *
|
||||||
ladspa_descriptor(ulong index) {
|
ladspa_descriptor(ulong index) {
|
||||||
|
if (!ready) _init();
|
||||||
|
|
||||||
if (index != 0)
|
if (index != 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
return &eqDescriptor;
|
return &eqDescriptor;
|
||||||
|
@ -224,6 +229,8 @@ _init() {
|
||||||
eqDescriptor.run = run_eq;
|
eqDescriptor.run = run_eq;
|
||||||
eqDescriptor.run_adding = run_adding_eq;
|
eqDescriptor.run_adding = run_adding_eq;
|
||||||
eqDescriptor.set_run_adding_gain = set_run_adding_gain;
|
eqDescriptor.set_run_adding_gain = set_run_adding_gain;
|
||||||
|
|
||||||
|
ready = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
#ifdef WIN32
|
||||||
|
#define DLL_EXPORT __declspec(dllexport)
|
||||||
|
#else
|
||||||
|
#define DLL_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef M_PI
|
#ifndef M_PI
|
||||||
#define M_PI 3.14159265358979323846264338327
|
#define M_PI 3.14159265358979323846264338327
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue