summaryrefslogtreecommitdiff
path: root/apps/codecs/libgme/ym2612_emu.c
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2011-08-11 19:04:28 +0000
committerBertrik Sikken <bertrik@sikken.nl>2011-08-11 19:04:28 +0000
commitb1279498609808cf65a7054ae7085b4885a33e66 (patch)
tree65b811724afd1237bbaddf16d503134d1048196f /apps/codecs/libgme/ym2612_emu.c
parent39e4987ea5c2326249583b53afcd9038d8209ba9 (diff)
downloadrockbox-b1279498609808cf65a7054ae7085b4885a33e66.tar.gz
rockbox-b1279498609808cf65a7054ae7085b4885a33e66.zip
libgme: make local functions static where possible
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30280 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libgme/ym2612_emu.c')
-rw-r--r--apps/codecs/libgme/ym2612_emu.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/apps/codecs/libgme/ym2612_emu.c b/apps/codecs/libgme/ym2612_emu.c
index a2f32d30ca..54930298c9 100644
--- a/apps/codecs/libgme/ym2612_emu.c
+++ b/apps/codecs/libgme/ym2612_emu.c
@@ -86,7 +86,7 @@ static const unsigned char LFO_FMS_TAB [8] ICONST_ATTR =
86int in0, in1, in2, in3; // current phase calculation 86int in0, in1, in2, in3; // current phase calculation
87// int en0, en1, en2, en3; // current enveloppe calculation 87// int en0, en1, en2, en3; // current enveloppe calculation
88 88
89inline void set_seg( struct slot_t* s, int seg ) 89static inline void set_seg( struct slot_t* s, int seg )
90{ 90{
91 s->env_xor = 0; 91 s->env_xor = 0;
92 s->env_max = INT_MAX; 92 s->env_max = INT_MAX;
@@ -98,9 +98,9 @@ inline void set_seg( struct slot_t* s, int seg )
98 } 98 }
99} 99}
100 100
101inline void YM2612_Special_Update(void) { } 101static inline void YM2612_Special_Update(void) { }
102 102
103void KEY_ON( struct channel_* ch, struct tables_t *g, int nsl ) 103static void KEY_ON( struct channel_* ch, struct tables_t *g, int nsl )
104{ 104{
105 struct slot_t *SL = &(ch->SLOT [nsl]); // on recupere le bon pointeur de slot 105 struct slot_t *SL = &(ch->SLOT [nsl]); // on recupere le bon pointeur de slot
106 106
@@ -123,7 +123,7 @@ void KEY_ON( struct channel_* ch, struct tables_t *g, int nsl )
123} 123}
124 124
125 125
126void KEY_OFF( struct channel_* ch, struct tables_t *g, int nsl ) 126static void KEY_OFF( struct channel_* ch, struct tables_t *g, int nsl )
127{ 127{
128 struct slot_t *SL = &(ch->SLOT [nsl]); // on recupere le bon pointeur de slot 128 struct slot_t *SL = &(ch->SLOT [nsl]); // on recupere le bon pointeur de slot
129 129
@@ -141,7 +141,7 @@ void KEY_OFF( struct channel_* ch, struct tables_t *g, int nsl )
141} 141}
142 142
143 143
144int SLOT_SET( struct Ym2612_Impl* impl, int Adr, int data ) 144static int SLOT_SET( struct Ym2612_Impl* impl, int Adr, int data )
145{ 145{
146 int nch = Adr & 3; 146 int nch = Adr & 3;
147 if ( nch == 3 ) 147 if ( nch == 3 )
@@ -245,7 +245,7 @@ int SLOT_SET( struct Ym2612_Impl* impl, int Adr, int data )
245} 245}
246 246
247 247
248int CHANNEL_SET( struct state_t* YM2612, int Adr, int data ) 248static int CHANNEL_SET( struct state_t* YM2612, int Adr, int data )
249{ 249{
250 int num = Adr & 3; 250 int num = Adr & 3;
251 if ( num == 3 ) 251 if ( num == 3 )
@@ -348,7 +348,7 @@ int CHANNEL_SET( struct state_t* YM2612, int Adr, int data )
348} 348}
349 349
350 350
351int YM_SET( struct Ym2612_Impl* impl, int Adr, int data ) 351static int YM_SET( struct Ym2612_Impl* impl, int Adr, int data )
352{ 352{
353 struct state_t* YM2612 = &impl->YM2612; 353 struct state_t* YM2612 = &impl->YM2612;
354 struct tables_t* g = &impl->g; 354 struct tables_t* g = &impl->g;
@@ -480,7 +480,7 @@ double ipow(double a,int b)
480#endif 480#endif
481 481
482void impl_reset( struct Ym2612_Impl* impl ); 482void impl_reset( struct Ym2612_Impl* impl );
483void impl_set_rate( struct Ym2612_Impl* impl, double sample_rate, double clock_rate ) 483static void impl_set_rate( struct Ym2612_Impl* impl, double sample_rate, double clock_rate )
484{ 484{
485 assert( sample_rate ); 485 assert( sample_rate );
486 assert( !clock_rate || clock_rate > sample_rate ); 486 assert( !clock_rate || clock_rate > sample_rate );
@@ -695,7 +695,7 @@ const char* Ym2612_set_rate( struct Ym2612_Emu* this, double sample_rate, double
695 return 0; 695 return 0;
696} 696}
697 697
698inline void write0( struct Ym2612_Impl* impl, int opn_addr, int data ) 698static inline void write0( struct Ym2612_Impl* impl, int opn_addr, int data )
699{ 699{
700 assert( (unsigned) data <= 0xFF ); 700 assert( (unsigned) data <= 0xFF );
701 701
@@ -715,7 +715,7 @@ inline void write0( struct Ym2612_Impl* impl, int opn_addr, int data )
715 } 715 }
716} 716}
717 717
718inline void write1( struct Ym2612_Impl* impl, int opn_addr, int data ) 718static inline void write1( struct Ym2612_Impl* impl, int opn_addr, int data )
719{ 719{
720 assert( (unsigned) data <= 0xFF ); 720 assert( (unsigned) data <= 0xFF );
721 721
@@ -954,7 +954,7 @@ ch->SLOT [S1].Fcnt = in1; \
954ch->SLOT [S2].Fcnt = in2; \ 954ch->SLOT [S2].Fcnt = in2; \
955ch->SLOT [S3].Fcnt = in3; 955ch->SLOT [S3].Fcnt = in3;
956 956
957void ym2612_update_chan0( struct tables_t* g, struct channel_* ch, 957static void ym2612_update_chan0( struct tables_t* g, struct channel_* ch,
958 short* buf, int length ) 958 short* buf, int length )
959{ 959{
960 int not_end = ch->SLOT [S3].Ecnt - ENV_END; 960 int not_end = ch->SLOT [S3].Ecnt - ENV_END;
@@ -987,7 +987,7 @@ void ym2612_update_chan0( struct tables_t* g, struct channel_* ch,
987 UPDATE_PHASE 987 UPDATE_PHASE
988} 988}
989 989
990void ym2612_update_chan1( struct tables_t* g, struct channel_* ch, 990static void ym2612_update_chan1( struct tables_t* g, struct channel_* ch,
991 short* buf, int length ) 991 short* buf, int length )
992{ 992{
993 int not_end = ch->SLOT [S3].Ecnt - ENV_END; 993 int not_end = ch->SLOT [S3].Ecnt - ENV_END;
@@ -1019,7 +1019,7 @@ void ym2612_update_chan1( struct tables_t* g, struct channel_* ch,
1019 UPDATE_PHASE 1019 UPDATE_PHASE
1020} 1020}
1021 1021
1022void ym2612_update_chan2( struct tables_t* g, struct channel_* ch, 1022static void ym2612_update_chan2( struct tables_t* g, struct channel_* ch,
1023 short* buf, int length ) 1023 short* buf, int length )
1024{ 1024{
1025 int not_end = ch->SLOT [S3].Ecnt - ENV_END; 1025 int not_end = ch->SLOT [S3].Ecnt - ENV_END;
@@ -1051,7 +1051,7 @@ void ym2612_update_chan2( struct tables_t* g, struct channel_* ch,
1051 UPDATE_PHASE 1051 UPDATE_PHASE
1052} 1052}
1053 1053
1054void ym2612_update_chan3( struct tables_t* g, struct channel_* ch, 1054static void ym2612_update_chan3( struct tables_t* g, struct channel_* ch,
1055 short* buf, int length ) 1055 short* buf, int length )
1056{ 1056{
1057 int not_end = ch->SLOT [S3].Ecnt - ENV_END; 1057 int not_end = ch->SLOT [S3].Ecnt - ENV_END;
@@ -1084,7 +1084,7 @@ void ym2612_update_chan3( struct tables_t* g, struct channel_* ch,
1084 UPDATE_PHASE 1084 UPDATE_PHASE
1085} 1085}
1086 1086
1087void ym2612_update_chan4( struct tables_t* g, struct channel_* ch, 1087static void ym2612_update_chan4( struct tables_t* g, struct channel_* ch,
1088 short* buf, int length ) 1088 short* buf, int length )
1089{ 1089{
1090 int not_end = ch->SLOT [S3].Ecnt - ENV_END; 1090 int not_end = ch->SLOT [S3].Ecnt - ENV_END;
@@ -1118,7 +1118,7 @@ void ym2612_update_chan4( struct tables_t* g, struct channel_* ch,
1118 UPDATE_PHASE 1118 UPDATE_PHASE
1119} 1119}
1120 1120
1121void ym2612_update_chan5( struct tables_t* g, struct channel_* ch, 1121static void ym2612_update_chan5( struct tables_t* g, struct channel_* ch,
1122 short* buf, int length ) 1122 short* buf, int length )
1123{ 1123{
1124 int not_end = ch->SLOT [S3].Ecnt - ENV_END; 1124 int not_end = ch->SLOT [S3].Ecnt - ENV_END;
@@ -1154,7 +1154,7 @@ void ym2612_update_chan5( struct tables_t* g, struct channel_* ch,
1154 UPDATE_PHASE 1154 UPDATE_PHASE
1155} 1155}
1156 1156
1157void ym2612_update_chan6( struct tables_t* g, struct channel_* ch, 1157static void ym2612_update_chan6( struct tables_t* g, struct channel_* ch,
1158 short* buf, int length ) 1158 short* buf, int length )
1159{ 1159{
1160 int not_end = ch->SLOT [S3].Ecnt - ENV_END; 1160 int not_end = ch->SLOT [S3].Ecnt - ENV_END;
@@ -1189,7 +1189,7 @@ void ym2612_update_chan6( struct tables_t* g, struct channel_* ch,
1189 UPDATE_PHASE 1189 UPDATE_PHASE
1190} 1190}
1191 1191
1192void ym2612_update_chan7( struct tables_t* g, struct channel_* ch, 1192static void ym2612_update_chan7( struct tables_t* g, struct channel_* ch,
1193 short* buf, int length ) 1193 short* buf, int length )
1194{ 1194{
1195 int not_end = ch->SLOT [S3].Ecnt - ENV_END; 1195 int not_end = ch->SLOT [S3].Ecnt - ENV_END;
@@ -1238,7 +1238,7 @@ static void (*UPDATE_CHAN[8])(struct tables_t* g, struct channel_* ch,
1238 (void *)ym2612_update_chan7 1238 (void *)ym2612_update_chan7
1239}; 1239};
1240 1240
1241void run_timer( struct Ym2612_Impl* impl, int length ) 1241static void run_timer( struct Ym2612_Impl* impl, int length )
1242{ 1242{
1243 int const step = 6; 1243 int const step = 6;
1244 int remain = length; 1244 int remain = length;
@@ -1284,7 +1284,7 @@ void run_timer( struct Ym2612_Impl* impl, int length )
1284 while ( remain > 0 ); 1284 while ( remain > 0 );
1285} 1285}
1286 1286
1287void impl_run( struct Ym2612_Impl* impl, int pair_count, short out [] ) 1287static void impl_run( struct Ym2612_Impl* impl, int pair_count, short out [] )
1288{ 1288{
1289 if ( pair_count <= 0 ) 1289 if ( pair_count <= 0 )
1290 return; 1290 return;