From e80acd41b8b6450c83a83fe37a47bc75a3d5d88c Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Sat, 10 Sep 2011 21:08:13 +0000 Subject: libgme: make local functions static, where possible git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30498 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libgme/hes_apu.c | 2 +- apps/codecs/libgme/hes_emu.c | 6 +++--- apps/codecs/libgme/resampler.c | 8 ++++---- apps/codecs/libgme/track_filter.c | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'apps/codecs/libgme') 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 balance_changed( this, o ); } -void run_osc( struct Hes_Osc* o, struct Blip_Synth* syn, blip_time_t end_time ) +static void run_osc( struct Hes_Osc* o, struct Blip_Synth* syn, blip_time_t end_time ) { int vol0 = o->volume [0]; 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 ) // Emulation -void recalc_timer_load( struct Hes_Emu* this ) +static void recalc_timer_load( struct Hes_Emu* this ) { this->timer.load = this->timer.raw_load * this->timer_base + 1; } @@ -393,7 +393,7 @@ static void adjust_time( hes_time_t* time, hes_time_t delta ) } } -blargg_err_t end_frame( struct Hes_Emu* this, hes_time_t duration ) +static blargg_err_t end_frame( struct Hes_Emu* this, hes_time_t duration ) { /* if ( run_cpu( this, duration ) ) warning( "Emulation error (illegal instruction)" ); */ @@ -416,7 +416,7 @@ blargg_err_t end_frame( struct Hes_Emu* this, hes_time_t duration ) return 0; } -blargg_err_t run_clocks( struct Hes_Emu* this, blip_time_t* duration_ ) +static blargg_err_t run_clocks( struct Hes_Emu* this, blip_time_t* duration_ ) { return end_frame( this, *duration_ ); } 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 ) } } -void mix_samples( struct Resampler* this, struct Blip_Buffer* blip_buf, dsample_t out_ [] ) +static void mix_samples( struct Resampler* this, struct Blip_Buffer* blip_buf, dsample_t out_ [] ) { int const bass = BLIP_READER_BASS( *blip_buf ); BLIP_READER_BEGIN( sn, *blip_buf ); @@ -97,7 +97,7 @@ void mix_samples( struct Resampler* this, struct Blip_Buffer* blip_buf, dsample_ BLIP_READER_END( sn, *blip_buf ); } -dsample_t const* resample_( struct Resampler* this, dsample_t** out_, +static dsample_t const* resample_( struct Resampler* this, dsample_t** out_, dsample_t const* out_end, dsample_t const in [], int in_size ) { in_size -= write_offset; @@ -149,7 +149,7 @@ static inline int resample_wrapper( struct Resampler* this, dsample_t out [], in return result; } -int skip_input( struct Resampler* this, int count ) +static int skip_input( struct Resampler* this, int count ) { this->write_pos -= count; if ( this->write_pos < 0 ) // occurs when downsampling @@ -161,7 +161,7 @@ int skip_input( struct Resampler* this, int count ) return count; } -void play_frame_( struct Resampler* this, struct Blip_Buffer* blip_buf, dsample_t* out ) +static void play_frame_( struct Resampler* this, struct Blip_Buffer* blip_buf, dsample_t* out ) { int pair_count = this->sample_buf_size >> 1; 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 ) return 0; } -void clear_time_vars( struct Track_Filter* this ) +static void clear_time_vars( struct Track_Filter* this ) { this->emu_time = this->buf_remain; this->out_time = 0; @@ -77,7 +77,7 @@ blargg_err_t track_start( struct Track_Filter* this ) return this->emu_error; } -void end_track_if_error( struct Track_Filter* this, blargg_err_t err ) +static void end_track_if_error( struct Track_Filter* this, blargg_err_t err ) { if ( err ) { @@ -138,7 +138,7 @@ void track_set_fade( struct Track_Filter* this, int start, int length ) this->fade_step = 1; } -bool is_fading( struct Track_Filter* this ) +static bool is_fading( struct Track_Filter* this ) { return this->out_time >= this->fade_start && this->fade_start != indefinite_count; } @@ -151,7 +151,7 @@ static int int_log( int x, int step, int unit ) return ((unit - fraction) + (fraction >> 1)) >> shift; } -void handle_fade( struct Track_Filter* this, sample_t out [], int out_count ) +static void handle_fade( struct Track_Filter* this, sample_t out [], int out_count ) { int i; 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 ) // Silence detection -void emu_play( struct Track_Filter* this, sample_t out [], int count ) +static void emu_play( struct Track_Filter* this, sample_t out [], int count ) { this->emu_time += count; if ( !this->emu_track_ended_ ) -- cgit v1.2.3