mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
Run peak_chunk_test on CAF files.
This commit is contained in:
parent
7c2b899483
commit
97ca21cd46
@ -10,6 +10,9 @@
|
||||
* src/caf.c src/sndfile.c
|
||||
Fix reading and writing of PEAK chunks in CAF files.
|
||||
|
||||
* tests/peak_chunk_test.c tests/test_wrapper.sh.in
|
||||
Run peak_chunk_test on CAF files.
|
||||
|
||||
2009-09-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/aiff.c src/wav.c
|
||||
|
@ -54,8 +54,9 @@ main (int argc, char *argv [])
|
||||
if (argc != 2)
|
||||
{ printf ("Usage : %s <test>\n", argv [0]) ;
|
||||
printf (" Where <test> is one of the following:\n") ;
|
||||
printf (" wav - test WAV file peak chunk\n") ;
|
||||
printf (" aiff - test AIFF file PEAK chunk\n") ;
|
||||
printf (" caf - test CAF file PEAK chunk\n") ;
|
||||
printf (" wav - test WAV file peak chunk\n") ;
|
||||
printf (" all - perform all tests\n") ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
@ -79,6 +80,13 @@ main (int argc, char *argv [])
|
||||
test_count++ ;
|
||||
} ;
|
||||
|
||||
if (do_all || ! strcmp (argv [1], "caf"))
|
||||
{ test_float_peak ("peak_float.caf", SF_FORMAT_CAF | SF_FORMAT_FLOAT) ;
|
||||
|
||||
read_write_peak_test ("rw_peak.caf", SF_FORMAT_CAF | SF_FORMAT_FLOAT) ;
|
||||
test_count++ ;
|
||||
} ;
|
||||
|
||||
if (test_count == 0)
|
||||
{ printf ("Mono : ************************************\n") ;
|
||||
printf ("Mono : * No '%s' test defined.\n", argv [1]) ;
|
||||
@ -248,7 +256,13 @@ check_logged_peaks (char *buffer)
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
if (! (cptr = strstr (buffer, "Channels")) || sscanf (cptr, "Channels : %d", &channel_count) != 1)
|
||||
channel_count = 0 ;
|
||||
cptr = strstr (buffer, "Channels") ;
|
||||
if (cptr && sscanf (cptr, "Channels : %d", &k) == 1)
|
||||
channel_count = k ;
|
||||
else if (cptr && sscanf (cptr, "Channels / frame : %d", &k) == 1)
|
||||
channel_count = k ;
|
||||
else
|
||||
{ printf ("\n\nLine %d: Couldn't find channel count.\n", __LINE__) ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
@ -78,6 +78,7 @@ echo "----------------------------------------------------------------------"
|
||||
./lossy_comp_test@EXEEXT@ caf_ulaw
|
||||
./lossy_comp_test@EXEEXT@ caf_alaw
|
||||
./header_test@EXEEXT@ caf
|
||||
./peak_chunk_test@EXEEXT@ caf
|
||||
./misc_test@EXEEXT@ caf
|
||||
echo "----------------------------------------------------------------------"
|
||||
echo " $sfversion passed tests on CAF files."
|
||||
|
Loading…
Reference in New Issue
Block a user