1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Index: apps/codecs/libatrac/atrac3.h
===================================================================
--- apps/codecs/libatrac/atrac3.h  (revision 28640)
+++ apps/codecs/libatrac/atrac3.h  (working copy)
@@ -61,13 +61,13 @@
     int32_t           *spectrum;
     int32_t           *IMDCT_buf;

-    int32_t           delayBuf1[46]; ///<qmf delay buffers
-    int32_t           delayBuf2[46];
-    int32_t           delayBuf3[46];
+    int32_t           delayBuf1[46] MEM_ALIGN_ATTR; ///<qmf delay buffers
+    int32_t           delayBuf2[46] MEM_ALIGN_ATTR;
+    int32_t           delayBuf3[46] MEM_ALIGN_ATTR;
 } channel_unit;

 typedef struct {
-    int32_t             outSamples[2048];
+    int32_t             outSamples[2048] MEM_ALIGN_ATTR;
     GetBitContext       gb;
     //@{
     /** stream data */
@@ -92,8 +92,8 @@
     //@}
     //@{
     /** data buffers */    
-    uint8_t             decoded_bytes_buffer[1024];
-    int32_t             tempBuf[1070];
+    uint8_t             decoded_bytes_buffer[1024] MEM_ALIGN_ATTR;
+    int32_t             tempBuf[1070]              MEM_ALIGN_ATTR;
     //@}
     //@{
     /** extradata */
Index: apps/codecs/libatrac/atrac3data_fixed.h
===================================================================
--- apps/codecs/libatrac/atrac3data_fixed.h  (revision 28640)
+++ apps/codecs/libatrac/atrac3data_fixed.h  (working copy)
@@ -52,7 +52,7 @@

 /* mdct window scaled by 2^31 */
 /* Remark: The preceding sign corrects the sign of the hexadecimal values */
-static const int32_t window_lookup[128] ICONST_ATTR  = {
+static const int32_t window_lookup[128] ICONST_ATTR MEM_ALIGN_ATTR = {
     -0xffffb10c, -0xfffd394b, -0xfff8494f, -0xfff0e025, -0xffe6fc5f, -0xffda9c15, 
     -0xffcbbce6, -0xffba5bf4, -0xffa675e8, -0xff9006f0, -0xff770aba, -0xff5b7c7e, 
     -0xff3d56f2, -0xff1c9452, -0xfef92e59, -0xfed31e45, -0xfeaa5cd5, -0xfe7ee247, 
Index: apps/codecs/libatrac/atrac3.c
===================================================================
--- apps/codecs/libatrac/atrac3.c  (revision 28640)
+++ apps/codecs/libatrac/atrac3.c  (working copy)
@@ -55,14 +55,10 @@
 #define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)

 static VLC          spectral_coeff_tab[7];
-#if defined(CPU_ARM) && (ARM_ARCH >= 5)  /*ARMv5e+ uses 32x16 multiplication*/
-static int16_t      qmf_window[48] IBSS_ATTR  __attribute__ ((aligned (32))); 
-#else
-static int32_t      qmf_window[48] IBSS_ATTR __attribute__ ((aligned (16)));
-#endif
-static int32_t      atrac3_spectrum [2][1024] IBSS_ATTR __attribute__((aligned(16)));
-static int32_t      atrac3_IMDCT_buf[2][ 512] IBSS_ATTR __attribute__((aligned(16)));
-static int32_t      atrac3_prevFrame[2][1024] IBSS_ATTR;
+static int16_t      qmf_window[48]            IBSS_ATTR MEM_ALIGN_ATTR; 
+static int32_t      atrac3_spectrum [2][1024] IBSS_ATTR MEM_ALIGN_ATTR;
+static int32_t      atrac3_IMDCT_buf[2][ 512] IBSS_ATTR MEM_ALIGN_ATTR;
+static int32_t      atrac3_prevFrame[2][1024] IBSS_ATTR MEM_ALIGN_ATTR;
 static channel_unit channel_units[2] IBSS_ATTR_LARGE_IRAM;