mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-27 03:50:29 +00:00
examples/sndfile-convert.c : In function copy_metadata(), copy broadcast info if present.
This commit is contained in:
parent
0c1236235a
commit
7ec8cfadf2
@ -3,6 +3,9 @@
|
||||
* configure.ac
|
||||
Test for localtime and localtime_r.
|
||||
|
||||
* examples/sndfile-convert.c
|
||||
In function copy_metadata(), copy broadcast info if present.
|
||||
|
||||
* examples/sndfile-bwf-set.c examples/Makefile.am
|
||||
Add new file examples/sndfile-bwf-set.c and hook into build.
|
||||
|
||||
|
@ -346,6 +346,7 @@ main (int argc, char * argv [])
|
||||
static void
|
||||
copy_metadata (SNDFILE *outfile, SNDFILE *infile)
|
||||
{ SF_INSTRUMENT inst ;
|
||||
SF_BROADCAST_INFO binfo ;
|
||||
const char *str ;
|
||||
int k, err = 0 ;
|
||||
|
||||
@ -356,9 +357,14 @@ copy_metadata (SNDFILE *outfile, SNDFILE *infile)
|
||||
} ;
|
||||
|
||||
memset (&inst, 0, sizeof (inst)) ;
|
||||
memset (&binfo, 0, sizeof (binfo)) ;
|
||||
|
||||
if (sf_command (infile, SFC_GET_INSTRUMENT, &inst, sizeof (inst)) == SF_TRUE)
|
||||
sf_command (outfile, SFC_SET_INSTRUMENT, &inst, sizeof (inst)) ;
|
||||
|
||||
if (sf_command (infile, SFC_GET_BROADCAST_INFO, &binfo, sizeof (binfo)) == SF_TRUE)
|
||||
sf_command (outfile, SFC_SET_BROADCAST_INFO, &binfo, sizeof (binfo)) ;
|
||||
|
||||
} /* copy_metadata */
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user