History

some fixes I've had lying around for literally years; may as well commit them I suppose

robs committed 19 years ago

Commit ca17c961 parent 39de1445 files · +12 −10Browse files

Unified · Split

5 files
  1. test/Makefile +3 −2
  2. test/ltest.pl +2 −1
  3. test/model.c +3 −3
  4. test/plotA +2 −2
  5. test/responseAB +2 −2
test/Makefile+3−2
@@ -10,7 +10,7 @@ LIBS:=-lm · 9 unmodified lines
10all: ding model lding lmodel corr10all: ding model lding lmodel corr
11 11
12corr: corr.c12corr: corr.c
13 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<13 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
14 14
15ding: ding.c15ding: ding.c
16 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)16 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
@@ -25,5 +25,6 @@ lmodel: model.c · 8 unmodified lines
25 $(CC) $(CFLAGS) -DLSAMPL $(LDFLAGS) -o $@ $< $(LIBS)25 $(CC) $(CFLAGS) -DLSAMPL $(LDFLAGS) -o $@ $< $(LIBS)
26 26
27clean:27clean:
28 rm -f ding lding model lmodel corr *~28 rm -f ding lding model lmodel corr *~ A B
29 rm -rf d
29 30
test/ltest.pl+2−1
@@ -22,7 +22,7 @@ use strict; · 21 unmodified lines
22$|=1;22$|=1;
23 23
24# set default values24# set default values
25my $sox='../sox';25my $sox='../src/sox';
26my $effect='resample';26my $effect='resample';
27#my $effect='resample -qs';27#my $effect='resample -qs';
28#my $effect='resample -q';28#my $effect='resample -q';
@@ -31,6 +31,7 @@ my $effect='resample'; · 2 unmodified lines
31#my $effect='filter 400-2000';31#my $effect='filter 400-2000';
32#my $effect='filter 400-2000 1024';32#my $effect='filter 400-2000 1024';
33 33
34#my ($rate0,$rate1)=(44100,44100); # sample rates
34my ($rate0,$rate1)=(8000,22050); # sample rates35my ($rate0,$rate1)=(8000,22050); # sample rates
35my $p=400; # silence before/after tonepulse36my $p=400; # silence before/after tonepulse
36my $env="4000:16000:4000"; # attack, duration, drop37my $env="4000:16000:4000"; # attack, duration, drop
test/model.c+3−3
@@ -131,7 +131,7 @@ bigcalc(double Factor, double Freq1, const SAMPL *ibuff, int len) · 130 unmodified lines
131 double s2=0, v2=0;131 double s2=0, v2=0;
132 const SAMPL *ip;132 const SAMPL *ip;
133 133
134 static inline void a_init(double frq)134 inline void a_init(double frq)
135 {135 {
136 x = 1;136 x = 1;
137 y = 0;137 y = 0;
@@ -139,7 +139,7 @@ bigcalc(double Factor, double Freq1, const SAMPL *ibuff, int len) · 1 unmodified line
139 thy = sin(frq*M_PI);139 thy = sin(frq*M_PI);
140 }140 }
141 141
142 static inline const double a(double k, double L)142 inline double a(double k, double L)
143 {143 {
144 double a, l, u;144 double a, l, u;
145 l = L/2.0;145 l = L/2.0;
@@ -148,7 +148,7 @@ bigcalc(double Factor, double Freq1, const SAMPL *ibuff, int len) · 2 unmodified lines
148 return a;148 return a;
149 }149 }
150 150
151 static inline void a_post(int k)151 inline void a_post(int k)
152 {152 {
153 double x1;153 double x1;
154 x1 = x*thx - y*thy;154 x1 = x*thx - y*thy;
test/plotA+2−2
@@ -6,8 +6,8 @@ set mytics 2 · 5 unmodified lines
6set grid xtics ytics6set grid xtics ytics
7set grid mxtics mytics7set grid mxtics mytics
8show grid8show grid
9plot [0:4000] 'A' using (4000*$1):2 title "response" with lines,\9plot [0:22050] 'A' using (22050*$1):2 title "response" with lines,\
10 'A' using (4000*$1):3 title "error" with lines10 'A' using (22050*$1):3 title "error" with lines
11pause -1 "Hit return to continue"11pause -1 "Hit return to continue"
12quit12quit
13 13
test/responseAB+2−2
@@ -6,8 +6,8 @@ set mytics 2 · 5 unmodified lines
6set grid xtics ytics6set grid xtics ytics
7set grid mxtics mytics7set grid mxtics mytics
8show grid8show grid
9plot [0:4000] 'A' using (4000*$1):2 title "A response" with lines,\9plot [0:22050] 'A' using (22050*$1):2 title "A response" with lines,\
10 'B' using (4000*$1):3 title "B response" with lines10 'B' using (22050*$1):2 title "B response" with lines
11pause -1 "Hit return to continue"11pause -1 "Hit return to continue"
12quit12quit
13 13

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t