mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
sndfile-info.c : Clean up usage of SF_INFO struct.
This commit is contained in:
parent
acd834c013
commit
038d8f62c7
@ -6,6 +6,9 @@
|
||||
* src/sndfile.h.in
|
||||
Define enums for channel mapping.
|
||||
|
||||
* examples/sndfile-info.c
|
||||
Clean up usage of SF_INFO struct.
|
||||
|
||||
2006-04-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* tests/util.tpl
|
||||
|
@ -207,9 +207,15 @@ info_dump (const char *filename)
|
||||
SF_INFO sfinfo ;
|
||||
double signal_max, decibels ;
|
||||
|
||||
sfinfo.format = 0 ;
|
||||
memset (&sfinfo, 0, sizeof (sfinfo)) ;
|
||||
|
||||
file = sf_open (filename, SFM_READ, &sfinfo) ;
|
||||
if ((file = sf_open (filename, SFM_READ, &sfinfo)) == NULL)
|
||||
{ printf ("Error : Not able to open input file %s.\n", filename) ;
|
||||
fflush (stdout) ;
|
||||
memset (data, 0, sizeof (data)) ;
|
||||
puts (sf_strerror (NULL)) ;
|
||||
return ;
|
||||
} ;
|
||||
|
||||
printf ("========================================\n") ;
|
||||
sf_command (file, SFC_GET_LOG_INFO, strbuffer, BUFFER_LEN) ;
|
||||
@ -268,6 +274,8 @@ instrument_dump (const char *filename)
|
||||
SF_INSTRUMENT inst ;
|
||||
int got_inst, k ;
|
||||
|
||||
memset (&sfinfo, 0, sizeof (sfinfo)) ;
|
||||
|
||||
if ((file = sf_open (filename, SFM_READ, &sfinfo)) == NULL)
|
||||
{ printf ("Error : Not able to open input file %s.\n", filename) ;
|
||||
fflush (stdout) ;
|
||||
@ -304,6 +312,8 @@ broadcast_dump (const char *filename)
|
||||
SF_BROADCAST_INFO bext ;
|
||||
int got_bext ;
|
||||
|
||||
memset (&sfinfo, 0, sizeof (sfinfo)) ;
|
||||
|
||||
if ((file = sf_open (filename, SFM_READ, &sfinfo)) == NULL)
|
||||
{ printf ("Error : Not able to open input file %s.\n", filename) ;
|
||||
fflush (stdout) ;
|
||||
|
Loading…
Reference in New Issue
Block a user