Add a channel_map pointer to the SF_PRIVATE struct.

This commit is contained in:
Erik de Castro Lopo 2006-05-01 08:54:27 +00:00
parent 51cd92cd23
commit d1da6dbaaa
3 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,12 @@
2006-05-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* tests/command_test.c
Add channel map tests.
* src/common.h src/sndfile.c
Add a pointer the the SF_PRIVATE struct and make sure it gets freed when in
sf_close().
2006-04-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* configure.ac doc/(command|index|api).html NEWS README

View File

@ -278,6 +278,9 @@ typedef struct sf_private_tag
/* Broadcast (EBU) Info */
SF_BROADCAST_INFO *broadcast_info ;
/* Channel map data (if present) : an array of ints. */
int *channel_map ;
sf_count_t filelength ; /* Overall length of (embedded) file. */
sf_count_t fileoffset ; /* Offset in number of bytes from beginning of file. */

View File

@ -2389,6 +2389,9 @@ psf_close (SF_PRIVATE *psf)
if (psf->instrument)
free (psf->instrument) ;
if (psf->channel_map)
free (psf->channel_map) ;
if (psf->format_desc)
{ memset (psf->format_desc, 0, strlen (psf->format_desc)) ;
free (psf->format_desc) ;