History

Merge tests/calc_snr.h into tests/util.h and remove old file.

Erik de Castro Lopo committed 20 years ago

Commit c8a94e01 parent 5caea029 files · +8 −39Browse files

Unified · Split

9 files
  1. tests/Makefile.am +2 −2
  2. tests/benchmark.c +0 −1
  3. tests/calc_snr.c +0 −1
  4. tests/calc_snr.h +0 −27
  5. tests/multi_channel_test.c +2 −3
  6. tests/snr_bw_test.c +2 −3
  7. tests/src-evaluate.c +0 −1
  8. tests/util.h +2 −0
  9. tests/varispeed_test.c +0 −1
tests/Makefile.am+2−2
@@ -4,7 +4,7 @@ noinst_PROGRAMS = misc_test termination_test simple_test callback_test \ · 3 unmodified lines
4 4
5SAMPLRATEDIR =../src5SAMPLRATEDIR =../src
6INCLUDES = -I$(srcdir)/$(SAMPLRATEDIR)6INCLUDES = -I$(srcdir)/$(SAMPLRATEDIR)
7noinst_HEADERS = calc_snr.h util.h7noinst_HEADERS = util.h
8 8
9#===============================================================================9#===============================================================================
10 10
@@ -35,7 +35,7 @@ callback_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la · 24 unmodified lines
35float_short_test_SOURCES = float_short_test.c util.c util.h35float_short_test_SOURCES = float_short_test.c util.c util.h
36float_short_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la36float_short_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la
37 37
38varispeed_test_SOURCES = varispeed_test.c util.c util.h calc_snr.c calc_snr.h38varispeed_test_SOURCES = varispeed_test.c util.c util.h calc_snr.c
39varispeed_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la $(FFTW3_LIBS)39varispeed_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la $(FFTW3_LIBS)
40 40
41# This program is for evaluating other sample rate converters.41# This program is for evaluating other sample rate converters.
tests/benchmark.c+0−1
@@ -7,7 +7,6 @@ · 6 unmodified lines
7#include <samplerate.h>7#include <samplerate.h>
8 8
9#include "util.h"9#include "util.h"
10#include "calc_snr.h"
11 10
12#define BUFFER_LEN (1<<23)11#define BUFFER_LEN (1<<23)
13#define SNR_LEN (1<<16)12#define SNR_LEN (1<<16)
tests/calc_snr.c+0−1
@@ -18,7 +18,6 @@ · 17 unmodified lines
18 18
19#include "config.h"19#include "config.h"
20 20
21#include "calc_snr.h"
22#include "util.h"21#include "util.h"
23 22
24#if (HAVE_FFTW3 == 1)23#if (HAVE_FFTW3 == 1)
tests/calc_snr.h+0−27
@@ -1,27 +0,0 @@
1/*
2** Copyright (C) 2002-2004 Erik de Castro Lopo <erikd@mega-nerd.com>
3**
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
6** the Free Software Foundation; either version 2 of the License, or
7** (at your option) any later version.
8**
9** This program is distributed in the hope that it will be useful,
10** but WITHOUT ANY WARRANTY; without even the implied warranty of
11** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12** GNU General Public License for more details.
13**
14** You should have received a copy of the GNU General Public License
15** along with this program; if not, write to the Free Software
16** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
17*/
18
19double calculate_snr (float *data, int len, int expected_peaks) ;
20/*
21** Do not edit or modify anything in this comment block.
22** The arch-tag line is a file identity tag for the GNU Arch
23** revision control system.
24**
25** arch-tag: b35c91c0-a2a7-4628-8c4e-59b582da2f42
26*/
27
tests/multi_channel_test.c+2−3
@@ -16,6 +16,8 @@ · 15 unmodified lines
16** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.16** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
17*/17*/
18 18
19#include "config.h"
20
19#include <stdio.h>21#include <stdio.h>
20#include <stdlib.h>22#include <stdlib.h>
21#include <string.h>23#include <string.h>
@@ -24,9 +26,6 @@ · 2 unmodified lines
24#include <samplerate.h>26#include <samplerate.h>
25 27
26#include "util.h"28#include "util.h"
27#include "calc_snr.h"
28#include "config.h"
29
30#define BUFFER_LEN (1<<15)29#define BUFFER_LEN (1<<15)
31#define BLOCK_LEN (12)30#define BLOCK_LEN (12)
32 31
tests/snr_bw_test.c+2−3
@@ -16,20 +16,19 @@ · 15 unmodified lines
16** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.16** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
17*/17*/
18 18
19#include "config.h"
20
19#include <stdio.h>21#include <stdio.h>
20#include <stdlib.h>22#include <stdlib.h>
21#include <string.h>23#include <string.h>
22#include <math.h>24#include <math.h>
23#include <time.h>25#include <time.h>
24 26
25#include "config.h"
26
27#if (HAVE_FFTW3)27#if (HAVE_FFTW3)
28 28
29#include <samplerate.h>29#include <samplerate.h>
30 30
31#include "util.h"31#include "util.h"
32#include "calc_snr.h"
33 32
34#define BUFFER_LEN 5000033#define BUFFER_LEN 50000
35#define MAX_FREQS 434#define MAX_FREQS 4
tests/src-evaluate.c+0−1
@@ -33,7 +33,6 @@ · 32 unmodified lines
33#include <math.h>33#include <math.h>
34#include <sys/utsname.h>34#include <sys/utsname.h>
35 35
36#include "calc_snr.h"
37#include "util.h"36#include "util.h"
38 37
39#define MAX_FREQS 438#define MAX_FREQS 4
tests/util.h+2−0
@@ -33,6 +33,8 @@ void deinterleave_data (const float *in, float *out, int frames, int channels) ; · 32 unmodified lines
33 33
34void reverse_data (float *data, int datalen) ;34void reverse_data (float *data, int datalen) ;
35 35
36double calculate_snr (float *data, int len, int expected_peaks) ;
37
36/*38/*
37** Do not edit or modify anything in this comment block.39** Do not edit or modify anything in this comment block.
38** The arch-tag line is a file identity tag for the GNU Arch 40** The arch-tag line is a file identity tag for the GNU Arch
tests/varispeed_test.c+0−1
@@ -24,7 +24,6 @@ · 23 unmodified lines
24#include <samplerate.h>24#include <samplerate.h>
25 25
26#include "util.h"26#include "util.h"
27#include "calc_snr.h"
28 27
29#define BUFFER_LEN (1 << 16)28#define BUFFER_LEN (1 << 16)
30 29

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