1556
1556
} /* wav_read_acid_chunk */
1560
|| This is the original 1.16 function. It was replaced with the 1.18
1561
|| function to correct a critter when dealing with coding history.
1559
1564
wav_read_bext_chunk (SF_PRIVATE *psf, unsigned int chunksize)
1596
1601
} /* wav_read_bext_chunk */
1605
wav_read_bext_chunk (SF_PRIVATE *psf, unsigned int chunksize)
1607
SF_BROADCAST_INFO* b ;
1608
unsigned int bytes = 0 ;
1610
if ((psf->broadcast_info = calloc (1, sizeof (SF_BROADCAST_INFO))) == NULL)
1611
{ psf->error = SFE_MALLOC_FAILED ;
1615
b = psf->broadcast_info ;
1617
bytes += psf_binheader_readf (psf, "b", b->description, sizeof (b->description)) ;
1618
bytes += psf_binheader_readf (psf, "b", b->originator, sizeof (b->originator)) ;
1619
bytes += psf_binheader_readf (psf, "b", b->originator_reference, sizeof (b->originator_reference)) ;
1620
bytes += psf_binheader_readf (psf, "b", b->origination_date, sizeof (b->origination_date)) ;
1621
bytes += psf_binheader_readf (psf, "b", b->origination_time, sizeof (b->origination_time)) ;
1622
bytes += psf_binheader_readf (psf, "442", &b->time_reference_low, &b->time_reference_high, &b->version) ;
1623
bytes += psf_binheader_readf (psf, "bj", &b->umid, sizeof (b->umid), 190) ;
1625
if (chunksize > WAV_BEXT_CHUNK_SIZE)
1626
{ /* File has coding history data. */
1628
b->coding_history_size = chunksize - WAV_BEXT_CHUNK_SIZE ;
1630
if (b->coding_history_size > SIGNED_SIZEOF (b->coding_history))
1631
b->coding_history_size = SIGNED_SIZEOF (b->coding_history) ;
1633
/* We do not parse the coding history */
1634
bytes += psf_binheader_readf (psf, "b", b->coding_history, b->coding_history_size) ;
1635
b->coding_history [sizeof (b->coding_history) - 1] = 0 ;
1638
if (bytes < chunksize)
1639
psf_binheader_readf (psf, "j", chunksize - bytes) ;
1642
} /* wav_read_bext_chunk */
1599
1645
wav_write_bext_chunk (SF_PRIVATE *psf)