ref: ca17c9685f235d6cf87aa522bbf3f587b3fd326e
parent: 39de14403bec2b82783e3570f8c38fcca5787155
author: robs <robs>
date: Sun Nov 4 04:39:54 EST 2007
some fixes I've had lying around for literally years; may as well commit them I suppose
--- a/test/Makefile
+++ b/test/Makefile
@@ -10,7 +10,7 @@
all: ding model lding lmodel corr
corr: corr.c
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
ding: ding.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
@@ -25,5 +25,6 @@
$(CC) $(CFLAGS) -DLSAMPL $(LDFLAGS) -o $@ $< $(LIBS)
clean:
- rm -f ding lding model lmodel corr *~
+ rm -f ding lding model lmodel corr *~ A B
+ rm -rf d
--- a/test/ltest.pl
+++ b/test/ltest.pl
@@ -22,7 +22,7 @@
$|=1;
# set default values
-my $sox='../sox';
+my $sox='../src/sox';
my $effect='resample';
#my $effect='resample -qs';
#my $effect='resample -q';
@@ -31,6 +31,7 @@
#my $effect='filter 400-2000';
#my $effect='filter 400-2000 1024';
+#my ($rate0,$rate1)=(44100,44100); # sample rates
my ($rate0,$rate1)=(8000,22050); # sample rates
my $p=400; # silence before/after tonepulse
my $env="4000:16000:4000"; # attack, duration, drop
--- a/test/model.c
+++ b/test/model.c
@@ -131,7 +131,7 @@
double s2=0, v2=0;
const SAMPL *ip;
- static inline void a_init(double frq)
+ inline void a_init(double frq)
{
x = 1;
y = 0;
@@ -139,7 +139,7 @@
thy = sin(frq*M_PI);
}
- static inline const double a(double k, double L)
+ inline double a(double k, double L)
{
double a, l, u;
l = L/2.0;
@@ -148,7 +148,7 @@
return a;
}
- static inline void a_post(int k)
+ inline void a_post(int k)
{
double x1;
x1 = x*thx - y*thy;
--- a/test/plotA
+++ b/test/plotA
@@ -6,8 +6,8 @@
set grid xtics ytics
set grid mxtics mytics
show grid
-plot [0:4000] 'A' using (4000*$1):2 title "response" with lines,\
- 'A' using (4000*$1):3 title "error" with lines
+plot [0:22050] 'A' using (22050*$1):2 title "response" with lines,\
+ 'A' using (22050*$1):3 title "error" with lines
pause -1 "Hit return to continue"
quit
--- a/test/responseAB
+++ b/test/responseAB
@@ -6,8 +6,8 @@
set grid xtics ytics
set grid mxtics mytics
show grid
-plot [0:4000] 'A' using (4000*$1):2 title "A response" with lines,\
- 'B' using (4000*$1):3 title "B response" with lines
+plot [0:22050] 'A' using (22050*$1):2 title "A response" with lines,\
+ 'B' using (22050*$1):2 title "B response" with lines
pause -1 "Hit return to continue"
quit