summaryrefslogtreecommitdiff
path: root/lib/rbcodec
diff options
context:
space:
mode:
authorThomas Jarosch <tomj@simonv.com>2015-01-11 21:40:51 +0100
committerThomas Jarosch <tomj@simonv.com>2015-01-11 21:40:51 +0100
commit2a3e1628a50b9de7c1462ee95eb79937795f5409 (patch)
tree3c2c965007a71c4895a65d8a91252b9ce2255719 /lib/rbcodec
parent85c98bc63c6635fe9e337178f23faa9c0ec3f9fb (diff)
downloadrockbox-2a3e1628a50b9de7c1462ee95eb79937795f5409.tar.gz
rockbox-2a3e1628a50b9de7c1462ee95eb79937795f5409.zip
Limit more variables to file scope
Change-Id: I30219d626316776eb73b4205d63376fa3dbc6361
Diffstat (limited to 'lib/rbcodec')
-rw-r--r--lib/rbcodec/codecs/libfaad/codebook/hcb.h10
-rw-r--r--lib/rbcodec/codecs/libfaad/huffman.c21
-rw-r--r--lib/rbcodec/codecs/libfaad/syntax.c10
-rw-r--r--lib/rbcodec/codecs/libgme/inflate/mallocer.c6
-rw-r--r--lib/rbcodec/codecs/libspeex/filters.c8
-rw-r--r--lib/rbcodec/codecs/libwavpack/wputils.c2
-rw-r--r--lib/rbcodec/codecs/libwmapro/mdct_tables.c12
-rw-r--r--lib/rbcodec/codecs/mod.c8
-rw-r--r--lib/rbcodec/codecs/sid.c22
-rw-r--r--lib/rbcodec/codecs/wav64.c2
10 files changed, 47 insertions, 54 deletions
diff --git a/lib/rbcodec/codecs/libfaad/codebook/hcb.h b/lib/rbcodec/codecs/libfaad/codebook/hcb.h
index eaefdbf437..53e234ade9 100644
--- a/lib/rbcodec/codecs/libfaad/codebook/hcb.h
+++ b/lib/rbcodec/codecs/libfaad/codebook/hcb.h
@@ -112,16 +112,6 @@ typedef struct
112 int8_t data[2]; 112 int8_t data[2];
113} hcb_bin_pair; 113} hcb_bin_pair;
114 114
115hcb *hcb_table[];
116hcb_2_quad *hcb_2_quad_table[];
117hcb_2_pair *hcb_2_pair_table[];
118hcb_bin_pair *hcb_bin_table[];
119uint8_t hcbN[];
120uint8_t unsigned_cb[];
121int hcb_2_quad_table_size[];
122int hcb_2_pair_table_size[];
123int hcb_bin_table_size[];
124
125#include "codebook/hcb_1.h" 115#include "codebook/hcb_1.h"
126#include "codebook/hcb_2.h" 116#include "codebook/hcb_2.h"
127#include "codebook/hcb_3.h" 117#include "codebook/hcb_3.h"
diff --git a/lib/rbcodec/codecs/libfaad/huffman.c b/lib/rbcodec/codecs/libfaad/huffman.c
index bea0dd7bf2..93e3a2dfc3 100644
--- a/lib/rbcodec/codecs/libfaad/huffman.c
+++ b/lib/rbcodec/codecs/libfaad/huffman.c
@@ -76,33 +76,33 @@ int8_t huffman_scale_factor(bitfile *ld)
76} 76}
77 77
78 78
79hcb *hcb_table[] ICONST_ATTR = { 79static hcb *hcb_table[] ICONST_ATTR = {
80 0, hcb1_1, hcb2_1, 0, hcb4_1, 0, hcb6_1, 0, hcb8_1, 0, hcb10_1, hcb11_1 80 0, hcb1_1, hcb2_1, 0, hcb4_1, 0, hcb6_1, 0, hcb8_1, 0, hcb10_1, hcb11_1
81}; 81};
82 82
83hcb_2_quad *hcb_2_quad_table[] ICONST_ATTR = { 83static hcb_2_quad *hcb_2_quad_table[] ICONST_ATTR = {
84 0, hcb1_2, hcb2_2, 0, hcb4_2, 0, 0, 0, 0, 0, 0, 0 84 0, hcb1_2, hcb2_2, 0, hcb4_2, 0, 0, 0, 0, 0, 0, 0
85}; 85};
86 86
87hcb_2_pair *hcb_2_pair_table[] ICONST_ATTR = { 87static hcb_2_pair *hcb_2_pair_table[] ICONST_ATTR = {
88 0, 0, 0, 0, 0, 0, hcb6_2, 0, hcb8_2, 0, hcb10_2, hcb11_2 88 0, 0, 0, 0, 0, 0, hcb6_2, 0, hcb8_2, 0, hcb10_2, hcb11_2
89}; 89};
90 90
91hcb_bin_pair *hcb_bin_table[] ICONST_ATTR = { 91static hcb_bin_pair *hcb_bin_table[] ICONST_ATTR = {
92 0, 0, 0, 0, 0, hcb5, 0, hcb7, 0, hcb9, 0, 0 92 0, 0, 0, 0, 0, hcb5, 0, hcb7, 0, hcb9, 0, 0
93}; 93};
94 94
95uint8_t hcbN[] ICONST_ATTR = { 0, 5, 5, 0, 5, 0, 5, 0, 5, 0, 6, 5 }; 95static uint8_t hcbN[] ICONST_ATTR = { 0, 5, 5, 0, 5, 0, 5, 0, 5, 0, 6, 5 };
96 96
97/* defines whether a huffman codebook is unsigned or not */ 97/* defines whether a huffman codebook is unsigned or not */
98/* Table 4.6.2 */ 98/* Table 4.6.2 */
99uint8_t unsigned_cb[] ICONST_ATTR = { 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 99static uint8_t unsigned_cb[] ICONST_ATTR = { 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0,
100 /* codebook 16 to 31 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 100 /* codebook 16 to 31 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
101}; 101};
102 102
103int hcb_2_quad_table_size[] ICONST_ATTR = { 0, 114, 86, 0, 185, 0, 0, 0, 0, 0, 0, 0 }; 103static int hcb_2_quad_table_size[] ICONST_ATTR = { 0, 114, 86, 0, 185, 0, 0, 0, 0, 0, 0, 0 };
104int hcb_2_pair_table_size[] ICONST_ATTR = { 0, 0, 0, 0, 0, 0, 126, 0, 83, 0, 210, 373 }; 104static int hcb_2_pair_table_size[] ICONST_ATTR = { 0, 0, 0, 0, 0, 0, 126, 0, 83, 0, 210, 373 };
105int hcb_bin_table_size[] ICONST_ATTR = { 0, 0, 0, 161, 0, 161, 0, 127, 0, 337, 0, 0 }; 105static int hcb_bin_table_size[] ICONST_ATTR = { 0, 0, 0, 161, 0, 161, 0, 127, 0, 337, 0, 0 };
106 106
107#define FAAD_GET_SIGN(idx) \ 107#define FAAD_GET_SIGN(idx) \
108 if (sp[idx]) \ 108 if (sp[idx]) \
@@ -113,6 +113,9 @@ static INLINE void huffman_sign_bits_pair(bitfile *ld, int16_t *sp)
113{ 113{
114 FAAD_GET_SIGN(0) 114 FAAD_GET_SIGN(0)
115 FAAD_GET_SIGN(1) 115 FAAD_GET_SIGN(1)
116
117 /* silence compiler warning about unused globals */
118 (void)unsigned_cb;
116} 119}
117 120
118static INLINE void huffman_sign_bits_quad(bitfile *ld, int16_t *sp) 121static INLINE void huffman_sign_bits_quad(bitfile *ld, int16_t *sp)
diff --git a/lib/rbcodec/codecs/libfaad/syntax.c b/lib/rbcodec/codecs/libfaad/syntax.c
index d3d7f9e3d4..65e1bf7744 100644
--- a/lib/rbcodec/codecs/libfaad/syntax.c
+++ b/lib/rbcodec/codecs/libfaad/syntax.c
@@ -558,8 +558,8 @@ void raw_data_block(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
558 558
559/* Table 4.4.4 and */ 559/* Table 4.4.4 and */
560/* Table 4.4.9 */ 560/* Table 4.4.9 */
561int16_t spec_data[FRAME_LEN] MEM_ALIGN_ATTR = {0}; 561static int16_t spec_data[FRAME_LEN] MEM_ALIGN_ATTR = {0};
562element sce; 562static element sce;
563static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld, 563static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld,
564 uint8_t channel, uint8_t *tag) 564 uint8_t channel, uint8_t *tag)
565{ 565{
@@ -604,9 +604,9 @@ static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld,
604 604
605/* Table 4.4.5 */ 605/* Table 4.4.5 */
606 606
607int16_t spec_data1[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR; 607static int16_t spec_data1[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR;
608int16_t spec_data2[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR; 608static int16_t spec_data2[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR;
609element cpe; 609static element cpe;
610static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld, 610static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld,
611 uint8_t channels, uint8_t *tag) 611 uint8_t channels, uint8_t *tag)
612{ 612{
diff --git a/lib/rbcodec/codecs/libgme/inflate/mallocer.c b/lib/rbcodec/codecs/libgme/inflate/mallocer.c
index 41abedd09f..1e9c235975 100644
--- a/lib/rbcodec/codecs/libgme/inflate/mallocer.c
+++ b/lib/rbcodec/codecs/libgme/inflate/mallocer.c
@@ -9,9 +9,9 @@
9#include "mallocer.h" 9#include "mallocer.h"
10#include "codeclib.h" 10#include "codeclib.h"
11 11
12unsigned char* mallocbuffer[MEMPOOL_MAX]; 12static unsigned char* mallocbuffer[MEMPOOL_MAX];
13long memory_ptr[MEMPOOL_MAX]; 13static long memory_ptr[MEMPOOL_MAX];
14size_t buffersize[MEMPOOL_MAX]; 14static size_t buffersize[MEMPOOL_MAX];
15 15
16int wpw_init_mempool(unsigned char mempool) 16int wpw_init_mempool(unsigned char mempool)
17{ 17{
diff --git a/lib/rbcodec/codecs/libspeex/filters.c b/lib/rbcodec/codecs/libspeex/filters.c
index 7c4c90a636..b6fb79c9e0 100644
--- a/lib/rbcodec/codecs/libspeex/filters.c
+++ b/lib/rbcodec/codecs/libspeex/filters.c
@@ -590,21 +590,21 @@ void qmf_synth(const spx_word16_t *x1, const spx_word16_t *x2, const spx_word16_
590 590
591#ifdef FIXED_POINT 591#ifdef FIXED_POINT
592#if 0 592#if 0
593const spx_word16_t shift_filt[3][7] = {{-33, 1043, -4551, 19959, 19959, -4551, 1043}, 593static const spx_word16_t shift_filt[3][7] = {{-33, 1043, -4551, 19959, 19959, -4551, 1043},
594 {-98, 1133, -4425, 29179, 8895, -2328, 444}, 594 {-98, 1133, -4425, 29179, 8895, -2328, 444},
595 {444, -2328, 8895, 29179, -4425, 1133, -98}}; 595 {444, -2328, 8895, 29179, -4425, 1133, -98}};
596#else 596#else
597const spx_word16_t shift_filt[3][7] = {{-390, 1540, -4993, 20123, 20123, -4993, 1540}, 597static const spx_word16_t shift_filt[3][7] = {{-390, 1540, -4993, 20123, 20123, -4993, 1540},
598 {-1064, 2817, -6694, 31589, 6837, -990, -209}, 598 {-1064, 2817, -6694, 31589, 6837, -990, -209},
599 {-209, -990, 6837, 31589, -6694, 2817, -1064}}; 599 {-209, -990, 6837, 31589, -6694, 2817, -1064}};
600#endif 600#endif
601#else 601#else
602#if 0 602#if 0
603const float shift_filt[3][7] = {{-9.9369e-04, 3.1831e-02, -1.3889e-01, 6.0910e-01, 6.0910e-01, -1.3889e-01, 3.1831e-02}, 603static const float shift_filt[3][7] = {{-9.9369e-04, 3.1831e-02, -1.3889e-01, 6.0910e-01, 6.0910e-01, -1.3889e-01, 3.1831e-02},
604 {-0.0029937, 0.0345613, -0.1350474, 0.8904793, 0.2714479, -0.0710304, 0.0135403}, 604 {-0.0029937, 0.0345613, -0.1350474, 0.8904793, 0.2714479, -0.0710304, 0.0135403},
605 {0.0135403, -0.0710304, 0.2714479, 0.8904793, -0.1350474, 0.0345613, -0.0029937}}; 605 {0.0135403, -0.0710304, 0.2714479, 0.8904793, -0.1350474, 0.0345613, -0.0029937}};
606#else 606#else
607const float shift_filt[3][7] = {{-0.011915f, 0.046995f, -0.152373f, 0.614108f, 0.614108f, -0.152373f, 0.046995f}, 607static const float shift_filt[3][7] = {{-0.011915f, 0.046995f, -0.152373f, 0.614108f, 0.614108f, -0.152373f, 0.046995f},
608 {-0.0324855f, 0.0859768f, -0.2042986f, 0.9640297f, 0.2086420f, -0.0302054f, -0.0063646f}, 608 {-0.0324855f, 0.0859768f, -0.2042986f, 0.9640297f, 0.2086420f, -0.0302054f, -0.0063646f},
609 {-0.0063646f, -0.0302054f, 0.2086420f, 0.9640297f, -0.2042986f, 0.0859768f, -0.0324855f}}; 609 {-0.0063646f, -0.0302054f, 0.2086420f, 0.9640297f, -0.2042986f, 0.0859768f, -0.0324855f}};
610#endif 610#endif
diff --git a/lib/rbcodec/codecs/libwavpack/wputils.c b/lib/rbcodec/codecs/libwavpack/wputils.c
index b0ccd3ba83..3487f980b2 100644
--- a/lib/rbcodec/codecs/libwavpack/wputils.c
+++ b/lib/rbcodec/codecs/libwavpack/wputils.c
@@ -23,7 +23,7 @@ static void strcpy_loc (char *dst, char *src) { while ((*dst++ = *src++) != 0);
23 23
24///////////////////////////// local table storage //////////////////////////// 24///////////////////////////// local table storage ////////////////////////////
25 25
26const uint32_t sample_rates [] = { 6000, 8000, 9600, 11025, 12000, 16000, 22050, 26static const uint32_t sample_rates [] = { 6000, 8000, 9600, 11025, 12000, 16000, 22050,
27 24000, 32000, 44100, 48000, 64000, 88200, 96000, 192000 }; 27 24000, 32000, 44100, 48000, 64000, 88200, 96000, 192000 };
28 28
29///////////////////////////// executable code //////////////////////////////// 29///////////////////////////// executable code ////////////////////////////////
diff --git a/lib/rbcodec/codecs/libwmapro/mdct_tables.c b/lib/rbcodec/codecs/libwmapro/mdct_tables.c
index bec3c37ee7..deea04f746 100644
--- a/lib/rbcodec/codecs/libwmapro/mdct_tables.c
+++ b/lib/rbcodec/codecs/libwmapro/mdct_tables.c
@@ -4,7 +4,7 @@
4/* Tables for fixed-point trig tables for windowing and mdct */ 4/* Tables for fixed-point trig tables for windowing and mdct */
5 5
6/* Windowing trig tables in s.31 format */ 6/* Windowing trig tables in s.31 format */
7const int32_t sine_4096[] = { 7static const int32_t sine_4096[] = {
8 0xFFF9B782, 0xFFED2685, 0xFFE09587, 0xFFD4048A, 0xFFC7738D, 0xFFBAE291, 8 0xFFF9B782, 0xFFED2685, 0xFFE09587, 0xFFD4048A, 0xFFC7738D, 0xFFBAE291,
9 0xFFAE5196, 0xFFA1C09B, 0xFF952FA1, 0xFF889EA8, 0xFF7C0DB1, 0xFF6F7CBB, 9 0xFFAE5196, 0xFFA1C09B, 0xFF952FA1, 0xFF889EA8, 0xFF7C0DB1, 0xFF6F7CBB,
10 0xFF62EBC5, 0xFF565AD3, 0xFF49C9E1, 0xFF3D38F0, 0xFF30A803, 0xFF241716, 10 0xFF62EBC5, 0xFF565AD3, 0xFF49C9E1, 0xFF3D38F0, 0xFF30A803, 0xFF241716,
@@ -690,7 +690,7 @@ const int32_t sine_4096[] = {
690 0x8000078F, 0x800003DC, 0x80000164, 0x80000028 690 0x8000078F, 0x800003DC, 0x80000164, 0x80000028
691}; 691};
692 692
693const int32_t sine_2048[] ICONST_ATTR_WMAPRO_WIN_VS_TMP = { 693static const int32_t sine_2048[] ICONST_ATTR_WMAPRO_WIN_VS_TMP = {
694 0xFFF36F03, 0xFFDA4D09, 0xFFC12B0F, 0xFFA80918, 0xFF8EE725, 0xFF75C536, 694 0xFFF36F03, 0xFFDA4D09, 0xFFC12B0F, 0xFFA80918, 0xFF8EE725, 0xFF75C536,
695 0xFF5CA34B, 0xFF438168, 0xFF2A5F8C, 0xFF113DB7, 0xFEF81BEE, 0xFEDEFA2D, 695 0xFF5CA34B, 0xFF438168, 0xFF2A5F8C, 0xFF113DB7, 0xFEF81BEE, 0xFEDEFA2D,
696 0xFEC5D876, 0xFEACB6CE, 0xFE939531, 0xFE7A73A2, 0xFE615224, 0xFE4830B4, 696 0xFEC5D876, 0xFEACB6CE, 0xFE939531, 0xFE7A73A2, 0xFE615224, 0xFE4830B4,
@@ -1035,7 +1035,7 @@ const int32_t sine_2048[] ICONST_ATTR_WMAPRO_WIN_VS_TMP = {
1035 0x8000058E, 0x8000009F 1035 0x8000058E, 0x8000009F
1036}; 1036};
1037 1037
1038const int32_t sine_1024[] = { 1038static const int32_t sine_1024[] = {
1039 0xFFE6DE06, 0xFFB49A13, 0xFF82562D, 0xFF501259, 0xFF1DCEA1, 0xFEEB8B0C, 1039 0xFFE6DE06, 0xFFB49A13, 0xFF82562D, 0xFF501259, 0xFF1DCEA1, 0xFEEB8B0C,
1040 0xFEB947A0, 0xFE870468, 0xFE54C16A, 0xFE227EAD, 0xFDF03C3D, 0xFDBDFA1A, 1040 0xFEB947A0, 0xFE870468, 0xFE54C16A, 0xFE227EAD, 0xFDF03C3D, 0xFDBDFA1A,
1041 0xFD8BB850, 0xFD5976EC, 0xFD2735EC, 0xFCF4F55C, 0xFCC2B548, 0xFC9075B1, 1041 0xFD8BB850, 0xFD5976EC, 0xFD2735EC, 0xFCF4F55C, 0xFCC2B548, 0xFC9075B1,
@@ -1209,7 +1209,7 @@ const int32_t sine_1024[] = {
1209 0x800078E8, 0x80003DB0, 0x80001636, 0x80000279 1209 0x800078E8, 0x80003DB0, 0x80001636, 0x80000279
1210}; 1210};
1211 1211
1212const int32_t sine_512[] = { 1212static const int32_t sine_512[] = {
1213 0xFFCDBC0C, 0xFF693440, 0xFF04ACD1, 0xFEA025FE, 0xFE3BA003, 0xFDD71B21, 1213 0xFFCDBC0C, 0xFF693440, 0xFF04ACD1, 0xFEA025FE, 0xFE3BA003, 0xFDD71B21,
1214 0xFD72978F, 0xFD0E1595, 0xFCA9956C, 0xFC45174E, 0xFBE09B85, 0xFB7C223F, 1214 0xFD72978F, 0xFD0E1595, 0xFCA9956C, 0xFC45174E, 0xFBE09B85, 0xFB7C223F,
1215 0xFB17ABC2, 0xFAB33854, 0xFA4EC823, 0xF9EA5B74, 0xF985F28F, 0xF9218DA0, 1215 0xFB17ABC2, 0xFAB33854, 0xFA4EC823, 0xF9EA5B74, 0xF985F28F, 0xF9218DA0,
@@ -1298,7 +1298,7 @@ const int32_t sine_512[] = {
1298 0x800058D4, 0x800009DF 1298 0x800058D4, 0x800009DF
1299}; 1299};
1300 1300
1301const int32_t sine_256[] ICONST_ATTR_WMAPRO_WIN_VS_TMP = { 1301static const int32_t sine_256[] ICONST_ATTR_WMAPRO_WIN_VS_TMP = {
1302 0xFF9B781E, 0xFED26950, 0xFE095D6B, 0xFD40565E, 0xFC775617, 0xFBAE5E8D, 1302 0xFF9B781E, 0xFED26950, 0xFE095D6B, 0xFD40565E, 0xFC775617, 0xFBAE5E8D,
1303 0xFAE571A2, 0xFA1C9157, 0xF953BF94, 0xF88AFE40, 0xF7C24F61, 0xF6F9B4C9, 1303 0xFAE571A2, 0xFA1C9157, 0xF953BF94, 0xF88AFE40, 0xF7C24F61, 0xF6F9B4C9,
1304 0xF6313075, 0xF568C463, 0xF4A07264, 0xF3D83C74, 0xF3102493, 0xF2482C8D, 1304 0xF6313075, 0xF568C463, 0xF4A07264, 0xF3D83C74, 0xF3102493, 0xF2482C8D,
@@ -1344,7 +1344,7 @@ const int32_t sine_256[] ICONST_ATTR_WMAPRO_WIN_VS_TMP = {
1344 0x80078E60, 0x8003DAF2, 0x8001634E, 0x8000277B 1344 0x80078E60, 0x8003DAF2, 0x8001634E, 0x8000277B
1345}; 1345};
1346 1346
1347const int32_t sine_128[] ICONST_ATTR = { 1347static const int32_t sine_128[] ICONST_ATTR = {
1348 0xFF36F079, 0xFDA4D929, 0xFC12D91C, 0xFA80FFCF, 0xF8EF5CBC, 0xF75DFF6C, 1348 0xFF36F079, 0xFDA4D929, 0xFC12D91C, 0xFA80FFCF, 0xF8EF5CBC, 0xF75DFF6C,
1349 0xF5CCF73F, 0xF43C53CB, 0xF2AC2474, 0xF11C7895, 0xEF8D5FC8, 0xEDFEE931, 1349 0xF5CCF73F, 0xF43C53CB, 0xF2AC2474, 0xF11C7895, 0xEF8D5FC8, 0xEDFEE931,
1350 0xEC71244A, 0xEAE4208A, 0xE957ED00, 0xE7CC9912, 0xE642341D, 0xE4B8CD16, 1350 0xEC71244A, 0xEAE4208A, 0xE957ED00, 0xE7CC9912, 0xE642341D, 0xE4B8CD16,
diff --git a/lib/rbcodec/codecs/mod.c b/lib/rbcodec/codecs/mod.c
index 4dd0cde6e5..3d5f729235 100644
--- a/lib/rbcodec/codecs/mod.c
+++ b/lib/rbcodec/codecs/mod.c
@@ -234,9 +234,9 @@ struct s_mixer {
234 struct s_channel channel[32]; 234 struct s_channel channel[32];
235}; 235};
236 236
237struct s_song modsong IDATA_ATTR; /* The Song */ 237static struct s_song modsong IDATA_ATTR; /* The Song */
238struct s_modplayer modplayer IDATA_ATTR; /* The Module Player */ 238static struct s_modplayer modplayer IDATA_ATTR; /* The Module Player */
239struct s_mixer mixer IDATA_ATTR; 239static struct s_mixer mixer IDATA_ATTR;
240 240
241/* The Amiga Period Table (+1 because we use index 0 for period 0 = no new note) */ 241/* The Amiga Period Table (+1 because we use index 0 for period 0 = no new note) */
242static unsigned short s_periodtable[37*8+1] IDATA_ATTR = 242static unsigned short s_periodtable[37*8+1] IDATA_ATTR =
@@ -290,7 +290,7 @@ static signed short s_sintable[0x40] IDATA_ATTR =
290 -255, -254, -250, -244, -235, -224, -211, -197, 290 -255, -254, -250, -244, -235, -224, -211, -197,
291 -180, -161, -141, -119, -97, -73, -49, -24}; 291 -180, -161, -141, -119, -97, -73, -49, -24};
292 292
293const unsigned short mixingrate = 44100; 293static const unsigned short mixingrate = 44100;
294 294
295static void mixer_playsample(int channel, int instrument) ICODE_ATTR; 295static void mixer_playsample(int channel, int instrument) ICODE_ATTR;
296void mixer_playsample(int channel, int instrument) 296void mixer_playsample(int channel, int instrument)
diff --git a/lib/rbcodec/codecs/sid.c b/lib/rbcodec/codecs/sid.c
index 6e39d3f759..3c370961c7 100644
--- a/lib/rbcodec/codecs/sid.c
+++ b/lib/rbcodec/codecs/sid.c
@@ -155,27 +155,27 @@ struct sidflt {
155}; 155};
156 156
157/* ------------------------ pseudo-constants (depending on mixing freq) */ 157/* ------------------------ pseudo-constants (depending on mixing freq) */
158int mixing_frequency IDATA_ATTR; 158static int mixing_frequency IDATA_ATTR;
159unsigned long freqmul IDATA_ATTR; 159static unsigned long freqmul IDATA_ATTR;
160int filtmul IDATA_ATTR; 160static int filtmul IDATA_ATTR;
161#ifndef ROCKBOX 161#ifndef ROCKBOX
162unsigned long attacks [16] IDATA_ATTR; 162unsigned long attacks [16] IDATA_ATTR;
163unsigned long releases[16] IDATA_ATTR; 163unsigned long releases[16] IDATA_ATTR;
164#endif 164#endif
165 165
166/* ------------------------------------------------------------ globals */ 166/* ------------------------------------------------------------ globals */
167struct s6581 sid IDATA_ATTR; 167static struct s6581 sid IDATA_ATTR;
168struct sidosc osc[3] IDATA_ATTR; 168static struct sidosc osc[3] IDATA_ATTR;
169struct sidflt filter IDATA_ATTR; 169static struct sidflt filter IDATA_ATTR;
170 170
171/* ------------------------------------------------------ C64 Emu Stuff */ 171/* ------------------------------------------------------ C64 Emu Stuff */
172unsigned char bval IDATA_ATTR; 172static unsigned char bval IDATA_ATTR;
173unsigned short wval IDATA_ATTR; 173static unsigned short wval IDATA_ATTR;
174/* -------------------------------------------------- Register & memory */ 174/* -------------------------------------------------- Register & memory */
175unsigned char a,x,y,s,p IDATA_ATTR; 175static unsigned char a,x,y,s,p IDATA_ATTR;
176unsigned short pc IDATA_ATTR; 176static unsigned short pc IDATA_ATTR;
177 177
178unsigned char memory[65536]; 178static unsigned char memory[65536];
179 179
180/* ----------------------------------------- Variables for sample stuff */ 180/* ----------------------------------------- Variables for sample stuff */
181static int sample_active IDATA_ATTR; 181static int sample_active IDATA_ATTR;
diff --git a/lib/rbcodec/codecs/wav64.c b/lib/rbcodec/codecs/wav64.c
index 96e605faad..66bb3e3a11 100644
--- a/lib/rbcodec/codecs/wav64.c
+++ b/lib/rbcodec/codecs/wav64.c
@@ -60,7 +60,7 @@ enum
60 WAVE_FORMAT_EXTENSIBLE = 0xFFFE 60 WAVE_FORMAT_EXTENSIBLE = 0xFFFE
61}; 61};
62 62
63const struct pcm_entry wave_codecs[] = { 63static const struct pcm_entry wave_codecs[] = {
64 { WAVE_FORMAT_UNKNOWN, 0 }, 64 { WAVE_FORMAT_UNKNOWN, 0 },
65 { WAVE_FORMAT_PCM, get_linear_pcm_codec }, 65 { WAVE_FORMAT_PCM, get_linear_pcm_codec },
66 { WAVE_FORMAT_ADPCM, get_ms_adpcm_codec }, 66 { WAVE_FORMAT_ADPCM, get_ms_adpcm_codec },