Unified · Split
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-08-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com> | ||
| 2 | |||
| 3 | * tests/multi_channel_test.c tests/snr_bw_test.c tests/varispeed_test.c | ||
| 4 | Use fftw_cleanup() to remove all memory leaks reported by valgrind. | ||
| 5 | |||
| 1 | 2012-08-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com> | 6 | 2012-08-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com> |
| 2 | 7 | ||
| 3 | * src/src_sinc.c | 8 | * src/src_sinc.c |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com> | 2 | ** Copyright (C) 2002-2012 Erik de Castro Lopo <erikd@mega-nerd.com> |
| 3 | ** | 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or modify | 4 | ** This program is free software; you can redistribute it and/or modify |
| 5 | ** it under the terms of the GNU General Public License as published by | 5 | ** it under the terms of the GNU General Public License as published by |
| @@ -24,6 +24,15 @@ · 18 unmodified lines | |||
| 24 | #include <math.h> | 24 | #include <math.h> |
| 25 | #include <assert.h> | 25 | #include <assert.h> |
| 26 | 26 | ||
| 27 | #if (HAVE_FFTW3) | ||
| 28 | #include <fftw3.h> | ||
| 29 | #else | ||
| 30 | static inline void | ||
| 31 | fftw_cleanup (void) | ||
| 32 | { return ; | ||
| 33 | } | ||
| 34 | #endif | ||
| 35 | |||
| 27 | #include <samplerate.h> | 36 | #include <samplerate.h> |
| 28 | 37 | ||
| 29 | #include "util.h" | 38 | #include "util.h" |
| @@ -65,6 +74,7 @@ main (void) · 35 unmodified lines | |||
| 65 | callback_test (SRC_SINC_FASTEST, k, target) ; | 74 | callback_test (SRC_SINC_FASTEST, k, target) ; |
| 66 | } ; | 75 | } ; |
| 67 | 76 | ||
| 77 | fftw_cleanup () ; | ||
| 68 | puts ("") ; | 78 | puts ("") ; |
| 69 | 79 | ||
| 70 | return 0 ; | 80 | return 0 ; |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com> | 2 | ** Copyright (C) 2002-2012 Erik de Castro Lopo <erikd@mega-nerd.com> |
| 3 | ** | 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or modify | 4 | ** This program is free software; you can redistribute it and/or modify |
| 5 | ** it under the terms of the GNU General Public License as published by | 5 | ** it under the terms of the GNU General Public License as published by |
| @@ -26,6 +26,8 @@ · 20 unmodified lines | |||
| 26 | 26 | ||
| 27 | #if (HAVE_FFTW3) | 27 | #if (HAVE_FFTW3) |
| 28 | 28 | ||
| 29 | #include <fftw3.h> | ||
| 30 | |||
| 29 | #include <samplerate.h> | 31 | #include <samplerate.h> |
| 30 | 32 | ||
| 31 | #include "util.h" | 33 | #include "util.h" |
| @@ -178,6 +180,8 @@ main (int argc, char *argv []) · 146 unmodified lines | |||
| 178 | printf (" Measured -3dB rolloff point : %5.2f %%.\n\n", freq3dB) ; | 180 | printf (" Measured -3dB rolloff point : %5.2f %%.\n\n", freq3dB) ; |
| 179 | } ; | 181 | } ; |
| 180 | 182 | ||
| 183 | fftw_cleanup () ; | ||
| 184 | |||
| 181 | return 0 ; | 185 | return 0 ; |
| 182 | } /* main */ | 186 | } /* main */ |
| 183 | 187 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** Copyright (C) 2006-2011 Erik de Castro Lopo <erikd@mega-nerd.com> | 2 | ** Copyright (C) 2006-2012 Erik de Castro Lopo <erikd@mega-nerd.com> |
| 3 | ** | 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or modify | 4 | ** This program is free software; you can redistribute it and/or modify |
| 5 | ** it under the terms of the GNU General Public License as published by | 5 | ** it under the terms of the GNU General Public License as published by |
| @@ -42,6 +42,7 @@ main (void) · 36 unmodified lines | |||
| 42 | printf (" Sinc interpolator : ") ; | 42 | printf (" Sinc interpolator : ") ; |
| 43 | varispeed_test (SRC_SINC_FASTEST, 115.0) ; | 43 | varispeed_test (SRC_SINC_FASTEST, 115.0) ; |
| 44 | 44 | ||
| 45 | fftw_cleanup () ; | ||
| 45 | puts ("") ; | 46 | puts ("") ; |
| 46 | 47 | ||
| 47 | return 0 ; | 48 | return 0 ; |