diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2013-02-11 20:13:35 +1100 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2013-02-11 20:30:15 +1100 |
commit | 6890818772170cea6e10ee78c9232c6063933e14 (patch) | |
tree | e91e99a4656011e15a6d760b9e2d3c107a9e48f9 | |
parent | 2ffaf92cb6f49c16e659904d0642ba2c9c9f92d4 (diff) |
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/alac.c | 6 |
2 files changed, 8 insertions, 3 deletions
@@ -3,6 +3,11 @@ * src/ALAC/ Replace Apple endswap routines with ones from libsndfile. + * merge from libsndfile-cart repo + Add ability to set and get a cart chunk with WAV and RF64. + Orignal patch by Chris Roberts <c.roberts@csrfm.com> required a number of + tweaks. + 2013-02-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com> * src/common.h @@ -229,7 +229,7 @@ static int alac_reader_init (SF_PRIVATE *psf, const ALAC_DECODER_INFO * info) { ALAC_PRIVATE *plac ; uint32_t kuki_size ; - uint8_t kuki [512] ; + union { uint8_t kuki [512] ; uint32_t alignment ; } u ; if (info == NULL) { psf_log_printf (psf, "%s : ALAC_DECODER_INFO is NULL.\n", __func__) ; @@ -253,9 +253,9 @@ alac_reader_init (SF_PRIVATE *psf, const ALAC_DECODER_INFO * info) } ; /* Read in the ALAC cookie data and pass it to the init function. */ - kuki_size = alac_kuki_read (psf, info->kuki_offset, kuki, sizeof (kuki)) ; + kuki_size = alac_kuki_read (psf, info->kuki_offset, u.kuki, sizeof (u.kuki)) ; - alac_decoder_init (&plac->decoder, kuki, kuki_size) ; + alac_decoder_init (&plac->decoder, u.kuki, kuki_size) ; switch (info->bits_per_sample) { case 16 : |