338
|
1 |
diff -ur ladspa_sdk-orig/src/applyplugin.c ladspa_sdk/src/applyplugin.c
|
|
2 |
--- ladspa_sdk-orig/src/applyplugin.c 2002-05-19 00:01:36.000000000 +0700
|
|
3 |
+++ ladspa_sdk/src/applyplugin.c 2007-05-15 22:01:43.013780887 +0700
|
|
4 |
@@ -6,7 +6,16 @@
|
|
5 |
/*****************************************************************************/
|
|
6 |
|
|
7 |
#include <dlfcn.h>
|
|
8 |
+#if defined(sun)
|
|
9 |
+#include <sys/byteorder.h>
|
|
10 |
+#if defined(_BIG_ENDIAN)
|
|
11 |
+#define BYTE_ORDER BIG_ENDIAN
|
|
12 |
+#else
|
|
13 |
+#define BYTE_ORDER LITTLE_ENDIAN
|
|
14 |
+#endif
|
|
15 |
+#else
|
|
16 |
#include <endian.h>
|
|
17 |
+#endif
|
|
18 |
#include <errno.h>
|
|
19 |
#include <math.h>
|
|
20 |
#include <stdlib.h>
|
|
21 |
diff -ur ladspa_sdk-orig/src/makefile ladspa_sdk/src/makefile
|
962
|
22 |
--- ladspa_sdk/src/makefile-orig 2008-03-09 15:18:36.847511000 -0500
|
|
23 |
+++ ladspa_sdk/src/makefile 2008-03-09 15:18:24.661697000 -0500
|
|
24 |
@@ -4,19 +4,17 @@
|
|
25 |
#
|
|
26 |
# Change these if you want to install somewhere else.
|
338
|
27 |
|
962
|
28 |
-INSTALL_PLUGINS_DIR = /usr/lib/ladspa/
|
338
|
29 |
-INSTALL_INCLUDE_DIR = /usr/include/
|
962
|
30 |
-INSTALL_BINARY_DIR = /usr/bin/
|
|
31 |
+INSTALL_PLUGINS_DIR = $(libexecdir)/ladspa
|
|
32 |
+INSTALL_INCLUDE_DIR = $(includedir)
|
|
33 |
+INSTALL_BINARY_DIR = $(bindir)
|
338
|
34 |
|
|
35 |
###############################################################################
|
|
36 |
#
|
|
37 |
# GENERAL
|
|
38 |
#
|
|
39 |
|
|
40 |
-INCLUDES = -I.
|
|
41 |
-LIBRARIES = -ldl -lm
|
|
42 |
-CFLAGS = $(INCLUDES) -Wall -Werror -O3 -fPIC
|
|
43 |
-CXXFLAGS = $(CFLAGS)
|
|
44 |
+INCLUDES = -I. $(CPPFLAGS)
|
|
45 |
+LIBS = -ldl -lm
|
|
46 |
PLUGINS = ../plugins/amp.so \
|
|
47 |
../plugins/delay.so \
|
|
48 |
../plugins/filter.so \
|
962
|
49 |
@@ -25,8 +23,6 @@ PLUGINS = ../plugins/amp.so \
|
338
|
50 |
PROGRAMS = ../bin/analyseplugin \
|
|
51 |
../bin/applyplugin \
|
|
52 |
../bin/listplugins
|
|
53 |
-CC = cc
|
|
54 |
-CPP = c++
|
|
55 |
|
|
56 |
###############################################################################
|
|
57 |
#
|
962
|
58 |
@@ -34,19 +30,21 @@ CPP = c++
|
338
|
59 |
#
|
|
60 |
|
|
61 |
../plugins/%.so: plugins/%.c ladspa.h
|
|
62 |
- $(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
|
|
63 |
- $(LD) -o ../plugins/$*.so plugins/$*.o -shared
|
|
64 |
+ $(CC) $(INCLUDES) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
|
|
65 |
+ $(LD) -G -o ../plugins/$*.so plugins/$*.o $(LIBS)
|
|
66 |
|
|
67 |
../plugins/%.so: plugins/%.cpp ladspa.h
|
|
68 |
- $(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
|
|
69 |
- $(CPP) -o ../plugins/$*.so plugins/$*.o -shared
|
|
70 |
+ $(CXX) $(INCLUDES) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
|
|
71 |
+ $(CXX) $(CXXFLAGS) -G -o ../plugins/$*.so plugins/$*.o $(LIBS)
|
|
72 |
|
|
73 |
###############################################################################
|
|
74 |
#
|
|
75 |
# TARGETS
|
|
76 |
#
|
|
77 |
|
|
78 |
-test: /tmp/test.wav ../snd/noise.wav always
|
|
79 |
+all: targets
|
|
80 |
+
|
|
81 |
+test: ../snd/noise.wav
|
|
82 |
@echo ---------------------------------------------
|
|
83 |
@echo First listen to the white noise input signal:
|
|
84 |
@echo ---------------------------------------------
|
962
|
85 |
@@ -58,13 +56,14 @@ test: /tmp/test.wav ../snd/noise.wav alw
|
|
86 |
-sndfile-play /tmp/test.wav
|
|
87 |
@echo Test complete.
|
338
|
88 |
|
|
89 |
-install: targets
|
962
|
90 |
- -mkdirhier $(INSTALL_PLUGINS_DIR)
|
|
91 |
- -mkdirhier $(INSTALL_INCLUDE_DIR)
|
|
92 |
- -mkdirhier $(INSTALL_BINARY_DIR)
|
338
|
93 |
- cp ../plugins/* $(INSTALL_PLUGINS_DIR)
|
|
94 |
- cp ladspa.h $(INSTALL_INCLUDE_DIR)
|
|
95 |
- cp ../bin/* $(INSTALL_BINARY_DIR)
|
|
96 |
+install: targets
|
962
|
97 |
+ -mkdir -p $(DESTDIR)$(INSTALL_PLUGINS_DIR) \
|
|
98 |
+ $(DESTDIR)$(INSTALL_INCLUDE_DIR) \
|
|
99 |
+ $(DESTDIR)$(INSTALL_BINARY_DIR)
|
338
|
100 |
+ cp ../plugins/* $(DESTDIR)$(INSTALL_PLUGINS_DIR)
|
|
101 |
+ cp ladspa.h $(DESTDIR)$(INSTALL_INCLUDE_DIR)
|
|
102 |
+ cp ../bin/* $(DESTDIR)$(INSTALL_BINARY_DIR)
|
962
|
103 |
+
|
338
|
104 |
|
|
105 |
/tmp/test.wav: targets ../snd/noise.wav
|
|
106 |
../bin/listplugins
|
962
|
107 |
@@ -90,17 +89,17 @@ targets: $(PLUGINS) $(PROGRAMS)
|
338
|
108 |
#
|
|
109 |
|
|
110 |
../bin/applyplugin: applyplugin.o load.o default.o
|
|
111 |
- $(CC) $(CFLAGS) $(LIBRARIES) \
|
|
112 |
+ $(CC) $(INCLUDES) $(CFLAGS) $(LIBS) \
|
|
113 |
-o ../bin/applyplugin \
|
|
114 |
applyplugin.o load.o default.o
|
|
115 |
|
|
116 |
../bin/analyseplugin: analyseplugin.o load.o default.o
|
|
117 |
- $(CC) $(CFLAGS) $(LIBRARIES) \
|
|
118 |
+ $(CC) $(INCLUDES) $(CFLAGS) $(LIBS) \
|
|
119 |
-o ../bin/analyseplugin \
|
|
120 |
analyseplugin.o load.o default.o
|
|
121 |
|
|
122 |
../bin/listplugins: listplugins.o search.o
|
|
123 |
- $(CC) $(CFLAGS) $(LIBRARIES) \
|
|
124 |
+ $(CC) $(INCLUDES) $(CFLAGS) $(LIBS) \
|
|
125 |
-o ../bin/listplugins \
|
|
126 |
listplugins.o search.o
|
|
127 |
|
|
128 |
diff -ur ladspa_sdk-orig/src/plugins/sine.cpp ladspa_sdk/src/plugins/sine.cpp
|
|
129 |
--- ladspa_sdk-orig/src/plugins/sine.cpp 2002-07-07 00:23:17.000000000 +0700
|
|
130 |
+++ ladspa_sdk/src/plugins/sine.cpp 2007-05-15 22:00:35.433840109 +0700
|
|
131 |
@@ -53,7 +53,7 @@
|
|
132 |
g_pfSineTable[lIndex] = LADSPA_Data(sin(dShift * lIndex));
|
|
133 |
}
|
|
134 |
if (g_fPhaseStepBase == 0) {
|
|
135 |
- g_fPhaseStepBase = (LADSPA_Data)pow(2, sizeof(unsigned long) * 8);
|
|
136 |
+ g_fPhaseStepBase = (LADSPA_Data)pow((double)2, (double)(sizeof(unsigned long) * 8));
|
|
137 |
}
|
|
138 |
}
|
|
139 |
|