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