summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2013-02-11 20:13:35 +1100
committerErik de Castro Lopo <erikd@mega-nerd.com>2013-02-11 20:30:15 +1100
commit6890818772170cea6e10ee78c9232c6063933e14 (patch)
treee91e99a4656011e15a6d760b9e2d3c107a9e48f9
parent2ffaf92cb6f49c16e659904d0642ba2c9c9f92d4 (diff)
Merge d7a161d9..2ffaf92c from libsndfile-cart.
-rw-r--r--ChangeLog5
-rw-r--r--src/alac.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1808149..96f58ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/src/alac.c b/src/alac.c
index de53e9b..65d1006 100644
--- a/src/alac.c
+++ b/src/alac.c
@@ -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 :