win32 fixes

This commit is contained in:
Connor Olding 2013-11-06 04:36:26 -08:00
parent c741ef87f3
commit 7a7850d88b
3 changed files with 15 additions and 2 deletions

View File

@ -12,7 +12,7 @@ SRC = ${OBJ:.o=.c}
PLACEBO_FLAGS = -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math
ALL_CFLAGS = -O3 ${PLACEBO_FLAGS} -std=c99 -fPIC -Wall ${CFLAGS}
ALL_LDFLAGS = -lm ${LDFLAGS}
SHARED_LDFLAGS = -nostartfiles -shared
SHARED_LDFLAGS = -shared
PREFIX ?= /usr/local
EXEC_PREFIX ?= ${PREFIX}

View File

@ -26,6 +26,9 @@ typedef unsigned long ulong;
#define BW_MIN 0.02
#define BW_MAX 8
static int ready = 0;
void _init();
LADSPA_PortDescriptor p_discs[PCOUNT];
LADSPA_PortRangeHint p_hints[PCOUNT];
const char *p_names[PCOUNT];
@ -59,8 +62,10 @@ typedef struct {
LADSPA_Data run_adding_gain;
} eq_t;
const LADSPA_Descriptor *
DLL_EXPORT const LADSPA_Descriptor *
ladspa_descriptor(ulong index) {
if (!ready) _init();
if (index != 0)
return NULL;
return &eqDescriptor;
@ -224,6 +229,8 @@ _init() {
eqDescriptor.run = run_eq;
eqDescriptor.run_adding = run_adding_eq;
eqDescriptor.set_run_adding_gain = set_run_adding_gain;
ready = 1;
}
void

View File

@ -1,3 +1,9 @@
#ifdef WIN32
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT
#endif
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
#endif