Add unique_id field to SF_PRIVATE struct.

This commit is contained in:
Erik de Castro Lopo 2008-08-17 16:27:54 +10:00
parent 9b0de382ee
commit 6ed1e67865
3 changed files with 8 additions and 0 deletions

View File

@ -18,6 +18,9 @@
* src/common.c
Use gettimeofday() to initialize psf_rand_int32.
* src/common.h src/sndfile.c
Add unique_id field to SF_PRIVATE struct.
2008-08-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* configure.ac

View File

@ -257,6 +257,8 @@ typedef struct sf_private_tag
/* Guard value. If this changes the buffers above have overflowed. */
int Magick ;
unsigned unique_id ;
/* Index variables for maintaining logbuffer and header above. */
int logindex ;
int headindex, headend ;

View File

@ -2460,6 +2460,9 @@ psf_open_file (SF_PRIVATE *psf, int mode, SF_INFO *sfinfo)
psf->float_int_mult = 0 ;
psf->float_max = -1.0 ;
/* An attempt at a per SF_PRIVATE unique id. */
psf->unique_id = psf_rand_int32 () ;
/*
** File formats that support ambisonic should override this default
** and set it to SF_AMBISONIC_NONE.