mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
src/wav.c : Add ability to write the channel mask.
This commit is contained in:
parent
1d9e276d8e
commit
ef85699437
@ -4,6 +4,9 @@
|
||||
Add wavex_channelmask to WAV_PRIVATE struct and add a function to convert
|
||||
an array of SF_CHANNEL_MASK_* values into a bit mask for use in WAV files.
|
||||
|
||||
* src/wav.c
|
||||
Add ability to write the channel mask.
|
||||
|
||||
2009-05-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* programs/sndfile-info.c
|
||||
|
@ -918,6 +918,8 @@ wavex_write_fmt_chunk (SF_PRIVATE *psf)
|
||||
*/
|
||||
if (wpriv->wavex_ambisonic != SF_AMBISONIC_NONE)
|
||||
psf_binheader_writef (psf, "4", 0) ;
|
||||
else if (wpriv->wavex_channelmask != 0)
|
||||
psf_binheader_writef (psf, "4", wpriv->wavex_channelmask) ;
|
||||
else
|
||||
{ /*
|
||||
** Ok some liberty is taken here to use the most commonly used channel masks
|
||||
@ -1262,6 +1264,10 @@ wav_command (SF_PRIVATE *psf, int command, void * UNUSED (data), int datasize)
|
||||
case SFC_WAVEX_GET_AMBISONIC :
|
||||
return wpriv->wavex_ambisonic ;
|
||||
|
||||
case SFC_SET_CHANNEL_MAP_INFO :
|
||||
wpriv->wavex_channelmask = wavex_gen_channel_mask (psf->channel_map, psf->sf.channels) ;
|
||||
return (wpriv->wavex_channelmask != 0) ;
|
||||
|
||||
default :
|
||||
break ;
|
||||
} ;
|
||||
|
Loading…
Reference in New Issue
Block a user