History

tests/ : Use fftw_cleanup() to remove all memory leaks reported by valgrind.

Erik de Castro Lopo committed 14 years ago

Commit 57c95131 parent cf3601b4 files · +23 −3Browse files

Unified · Split

4 files
  1. ChangeLog +5 −0
  2. tests/multi_channel_test.c +11 −1
  3. tests/snr_bw_test.c +5 −1
  4. tests/varispeed_test.c +2 −1
ChangeLog+5−0
@@ -1,3 +1,8 @@
12012-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
12012-08-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>62012-08-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
2 7
3 * src/src_sinc.c8 * src/src_sinc.c
tests/multi_channel_test.c+11−1
@@ -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 modify4** 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 by5** 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
30static inline void
31fftw_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 ;
tests/snr_bw_test.c+5−1
@@ -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 modify4** 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 by5** 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
tests/varispeed_test.c+2−1
@@ -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 modify4** 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 by5** 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 ;

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