summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2011-09-10 21:08:13 +0000
committerBertrik Sikken <bertrik@sikken.nl>2011-09-10 21:08:13 +0000
commite80acd41b8b6450c83a83fe37a47bc75a3d5d88c (patch)
treebc3179b77871384d345edd71ff1e38d4859c27f3
parentf163b405c0a6fcf069e79d099ac7d7d64adc4471 (diff)
downloadrockbox-e80acd41b8b6450c83a83fe37a47bc75a3d5d88c.tar.gz
rockbox-e80acd41b8b6450c83a83fe37a47bc75a3d5d88c.zip
libgme: make local functions static, where possible
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30498 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/libgme/hes_apu.c2
-rw-r--r--apps/codecs/libgme/hes_emu.c6
-rw-r--r--apps/codecs/libgme/resampler.c8
-rw-r--r--apps/codecs/libgme/track_filter.c10
4 files changed, 13 insertions, 13 deletions
diff --git a/apps/codecs/libgme/hes_apu.c b/apps/codecs/libgme/hes_apu.c
index 054b164a9a..a9cd32c8aa 100644
--- a/apps/codecs/libgme/hes_apu.c
+++ b/apps/codecs/libgme/hes_apu.c
@@ -134,7 +134,7 @@ void Apu_osc_output( struct Hes_Apu* this, int i, struct Blip_Buffer* center, st
134 balance_changed( this, o ); 134 balance_changed( this, o );
135} 135}
136 136
137void run_osc( struct Hes_Osc* o, struct Blip_Synth* syn, blip_time_t end_time ) 137static void run_osc( struct Hes_Osc* o, struct Blip_Synth* syn, blip_time_t end_time )
138{ 138{
139 int vol0 = o->volume [0]; 139 int vol0 = o->volume [0];
140 int vol1 = o->volume [1]; 140 int vol1 = o->volume [1];
diff --git a/apps/codecs/libgme/hes_emu.c b/apps/codecs/libgme/hes_emu.c
index 8ddbb9dc29..d6bafea334 100644
--- a/apps/codecs/libgme/hes_emu.c
+++ b/apps/codecs/libgme/hes_emu.c
@@ -142,7 +142,7 @@ blargg_err_t Hes_load_mem( struct Hes_Emu* this, void* data, long size )
142 142
143// Emulation 143// Emulation
144 144
145void recalc_timer_load( struct Hes_Emu* this ) 145static void recalc_timer_load( struct Hes_Emu* this )
146{ 146{
147 this->timer.load = this->timer.raw_load * this->timer_base + 1; 147 this->timer.load = this->timer.raw_load * this->timer_base + 1;
148} 148}
@@ -393,7 +393,7 @@ static void adjust_time( hes_time_t* time, hes_time_t delta )
393 } 393 }
394} 394}
395 395
396blargg_err_t end_frame( struct Hes_Emu* this, hes_time_t duration ) 396static blargg_err_t end_frame( struct Hes_Emu* this, hes_time_t duration )
397{ 397{
398 /* if ( run_cpu( this, duration ) ) 398 /* if ( run_cpu( this, duration ) )
399 warning( "Emulation error (illegal instruction)" ); */ 399 warning( "Emulation error (illegal instruction)" ); */
@@ -416,7 +416,7 @@ blargg_err_t end_frame( struct Hes_Emu* this, hes_time_t duration )
416 return 0; 416 return 0;
417} 417}
418 418
419blargg_err_t run_clocks( struct Hes_Emu* this, blip_time_t* duration_ ) 419static blargg_err_t run_clocks( struct Hes_Emu* this, blip_time_t* duration_ )
420{ 420{
421 return end_frame( this, *duration_ ); 421 return end_frame( this, *duration_ );
422} 422}
diff --git a/apps/codecs/libgme/resampler.c b/apps/codecs/libgme/resampler.c
index 91677cbb8a..c4f42a9794 100644
--- a/apps/codecs/libgme/resampler.c
+++ b/apps/codecs/libgme/resampler.c
@@ -64,7 +64,7 @@ void Resampler_resize( struct Resampler* this, int pairs )
64 } 64 }
65} 65}
66 66
67void mix_samples( struct Resampler* this, struct Blip_Buffer* blip_buf, dsample_t out_ [] ) 67static void mix_samples( struct Resampler* this, struct Blip_Buffer* blip_buf, dsample_t out_ [] )
68{ 68{
69 int const bass = BLIP_READER_BASS( *blip_buf ); 69 int const bass = BLIP_READER_BASS( *blip_buf );
70 BLIP_READER_BEGIN( sn, *blip_buf ); 70 BLIP_READER_BEGIN( sn, *blip_buf );
@@ -97,7 +97,7 @@ void mix_samples( struct Resampler* this, struct Blip_Buffer* blip_buf, dsample_
97 BLIP_READER_END( sn, *blip_buf ); 97 BLIP_READER_END( sn, *blip_buf );
98} 98}
99 99
100dsample_t const* resample_( struct Resampler* this, dsample_t** out_, 100static dsample_t const* resample_( struct Resampler* this, dsample_t** out_,
101 dsample_t const* out_end, dsample_t const in [], int in_size ) 101 dsample_t const* out_end, dsample_t const in [], int in_size )
102{ 102{
103 in_size -= write_offset; 103 in_size -= write_offset;
@@ -149,7 +149,7 @@ static inline int resample_wrapper( struct Resampler* this, dsample_t out [], in
149 return result; 149 return result;
150} 150}
151 151
152int skip_input( struct Resampler* this, int count ) 152static int skip_input( struct Resampler* this, int count )
153{ 153{
154 this->write_pos -= count; 154 this->write_pos -= count;
155 if ( this->write_pos < 0 ) // occurs when downsampling 155 if ( this->write_pos < 0 ) // occurs when downsampling
@@ -161,7 +161,7 @@ int skip_input( struct Resampler* this, int count )
161 return count; 161 return count;
162} 162}
163 163
164void play_frame_( struct Resampler* this, struct Blip_Buffer* blip_buf, dsample_t* out ) 164static void play_frame_( struct Resampler* this, struct Blip_Buffer* blip_buf, dsample_t* out )
165{ 165{
166 int pair_count = this->sample_buf_size >> 1; 166 int pair_count = this->sample_buf_size >> 1;
167 blip_time_t blip_time = Blip_count_clocks( blip_buf, pair_count ); 167 blip_time_t blip_time = Blip_count_clocks( blip_buf, pair_count );
diff --git a/apps/codecs/libgme/track_filter.c b/apps/codecs/libgme/track_filter.c
index f468a8c4b6..4776dcc7df 100644
--- a/apps/codecs/libgme/track_filter.c
+++ b/apps/codecs/libgme/track_filter.c
@@ -35,7 +35,7 @@ blargg_err_t track_init( struct Track_Filter* this, void* emu )
35 return 0; 35 return 0;
36} 36}
37 37
38void clear_time_vars( struct Track_Filter* this ) 38static void clear_time_vars( struct Track_Filter* this )
39{ 39{
40 this->emu_time = this->buf_remain; 40 this->emu_time = this->buf_remain;
41 this->out_time = 0; 41 this->out_time = 0;
@@ -77,7 +77,7 @@ blargg_err_t track_start( struct Track_Filter* this )
77 return this->emu_error; 77 return this->emu_error;
78} 78}
79 79
80void end_track_if_error( struct Track_Filter* this, blargg_err_t err ) 80static void end_track_if_error( struct Track_Filter* this, blargg_err_t err )
81{ 81{
82 if ( err ) 82 if ( err )
83 { 83 {
@@ -138,7 +138,7 @@ void track_set_fade( struct Track_Filter* this, int start, int length )
138 this->fade_step = 1; 138 this->fade_step = 1;
139} 139}
140 140
141bool is_fading( struct Track_Filter* this ) 141static bool is_fading( struct Track_Filter* this )
142{ 142{
143 return this->out_time >= this->fade_start && this->fade_start != indefinite_count; 143 return this->out_time >= this->fade_start && this->fade_start != indefinite_count;
144} 144}
@@ -151,7 +151,7 @@ static int int_log( int x, int step, int unit )
151 return ((unit - fraction) + (fraction >> 1)) >> shift; 151 return ((unit - fraction) + (fraction >> 1)) >> shift;
152} 152}
153 153
154void handle_fade( struct Track_Filter* this, sample_t out [], int out_count ) 154static void handle_fade( struct Track_Filter* this, sample_t out [], int out_count )
155{ 155{
156 int i; 156 int i;
157 for ( i = 0; i < out_count; i += fade_block_size ) 157 for ( i = 0; i < out_count; i += fade_block_size )
@@ -174,7 +174,7 @@ void handle_fade( struct Track_Filter* this, sample_t out [], int out_count )
174 174
175// Silence detection 175// Silence detection
176 176
177void emu_play( struct Track_Filter* this, sample_t out [], int count ) 177static void emu_play( struct Track_Filter* this, sample_t out [], int count )
178{ 178{
179 this->emu_time += count; 179 this->emu_time += count;
180 if ( !this->emu_track_ended_ ) 180 if ( !this->emu_track_ended_ )