History

src-evaluate.c : Minor updates.

Erik de Castro Lopo committed 21 years ago

Commit 834dcfc1 parent b22d1941 file · +7 −6Browse files

Unified · Split

tests/src-evaluate.c+7−6
@@ -37,7 +37,7 @@ · 36 unmodified lines
3737 #include "util.h"
3838
3939 #define MAX_FREQS 4
40−#define BUFFER_LEN 40000
40+#define BUFFER_LEN 80000
4141
4242 #define SAFE_STRNCAT(dest,src,len) \
4343 { int safe_strncat_count ; \
@@ -78,7 +78,7 @@ main (int argc, char *argv []) · 34 unmodified lines
7878 { { "sndfile-resample",
7979 "examples/sndfile-resample --version",
8080 "libsamplerate",
81− "examples/sndfile-resample --max-speed -c 2 -to %d source.wav destination.wav",
81+ "examples/sndfile-resample --max-speed -c 0 -to %d source.wav destination.wav",
8282 SF_FORMAT_WAV | SF_FORMAT_PCM_32
8383 },
8484 { "sox",
@@ -282,7 +282,7 @@ generate_source_wav (const char *filename, const double *freqs, int freq_count, · 197 unmodified lines
282282
283283 static double
284284 measure_destination_wav (char *filename, int *output_samples, int expected_peaks)
285−{ static float buffer [124000] ;
285+{ static float buffer [250000] ;
286286
287287 SNDFILE *sndfile ;
288288 SF_INFO sfinfo ;
@@ -299,7 +299,7 @@ measure_destination_wav (char *filename, int *output_samples, int expected_peaks · 10 unmodified lines
299299 } ;
300300
301301 if (sfinfo.frames > ARRAY_LEN (buffer))
302− { printf ("Line %d : Too many frames of data in file.\n", __LINE__) ;
302+ { printf ("Line %d : Too many frames (%ld) of data in file.\n", __LINE__, (long) sfinfo.frames) ;
303303 exit (1) ;
304304 } ;
305305
@@ -328,6 +328,7 @@ measure_snr (const RESAMPLE_PROG *prog, int *output_samples, int verbose) · 22 unmodified lines
328328 { 1, { 0.011111111111 }, 13231, 1, 1.0 },
329329 { 1, { 0.011111111111 }, 44101, 1, 1.0 },
330330 { 2, { 0.311111, 0.49 }, 78199, 2, 1.0 },
331+ { 2, { 0.011111, 0.49 }, 12345, 1, 0.5 },
331332 { 2, { 0.0123456, 0.4 }, 20143, 1, 0.5 },
332333 { 2, { 0.0111111, 0.4 }, 26461, 1, 0.5 },
333334 { 1, { 0.381111111111 }, 58661, 1, 1.0 }
@@ -349,7 +350,7 @@ measure_snr (const RESAMPLE_PROG *prog, int *output_samples, int verbose) · 15 unmodified lines
349350 generate_source_wav ("source.wav", snr_test [k].freqs, snr_test [k].freq_count, prog->format) ;
350351
351352 snprintf (command, sizeof (command), prog->convert_cmd, snr_test [k].output_samplerate) ;
352− SAFE_STRNCAT (command, " >/dev/null", sizeof (command)) ;
353+ SAFE_STRNCAT (command, " >/dev/null 2>&1", sizeof (command)) ;
353354 if ((retval = system (command)) != 0)
354355 printf ("system returned %d\n", retval) ;
355356
@@ -421,7 +422,7 @@ find_attenuation (double freq, const RESAMPLE_PROG *prog, int verbose) · 65 unmodified lines
421422 remove (filename) ;
422423
423424 snprintf (command, sizeof (command), prog->convert_cmd, 88189) ;
424− SAFE_STRNCAT (command, " >/dev/null", sizeof (command)) ;
425+ SAFE_STRNCAT (command, " >/dev/null 2>&1", sizeof (command)) ;
425426 if ((retval = system (command)) != 0)
426427 printf ("system returned %d\n", retval) ;
427428

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