diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2011-08-11 19:04:28 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2011-08-11 19:04:28 +0000 |
commit | b1279498609808cf65a7054ae7085b4885a33e66 (patch) | |
tree | 65b811724afd1237bbaddf16d503134d1048196f /apps/codecs/libgme/sgc_emu.c | |
parent | 39e4987ea5c2326249583b53afcd9038d8209ba9 (diff) | |
download | rockbox-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/sgc_emu.c')
-rw-r--r-- | apps/codecs/libgme/sgc_emu.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/codecs/libgme/sgc_emu.c b/apps/codecs/libgme/sgc_emu.c index ff8db0be9e..a25bdbc070 100644 --- a/apps/codecs/libgme/sgc_emu.c +++ b/apps/codecs/libgme/sgc_emu.c | |||
@@ -25,7 +25,7 @@ int const fade_shift = 8; // fade ends with gain at 1.0 / (1 << fade_shift) | |||
25 | 25 | ||
26 | const char gme_wrong_file_type [] = "Wrong file type for this emulator"; | 26 | const char gme_wrong_file_type [] = "Wrong file type for this emulator"; |
27 | 27 | ||
28 | void clear_track_vars( struct Sgc_Emu* this ) | 28 | static void clear_track_vars( struct Sgc_Emu* this ) |
29 | { | 29 | { |
30 | this->current_track = -1; | 30 | this->current_track = -1; |
31 | this->out_time = 0; | 31 | this->out_time = 0; |
@@ -110,7 +110,7 @@ blargg_err_t Sgc_load_mem( struct Sgc_Emu* this, const void* data, long size ) | |||
110 | return 0; | 110 | return 0; |
111 | } | 111 | } |
112 | 112 | ||
113 | void Sound_set_voice( struct Sgc_Emu* this, int i, struct Blip_Buffer* c, struct Blip_Buffer* l, struct Blip_Buffer* r ) | 113 | static void Sound_set_voice( struct Sgc_Emu* this, int i, struct Blip_Buffer* c, struct Blip_Buffer* l, struct Blip_Buffer* r ) |
114 | { | 114 | { |
115 | if ( i < sms_osc_count ) | 115 | if ( i < sms_osc_count ) |
116 | Sms_apu_set_output( &this->apu, i, c, l, r ); | 116 | Sms_apu_set_output( &this->apu, i, c, l, r ); |
@@ -118,7 +118,7 @@ void Sound_set_voice( struct Sgc_Emu* this, int i, struct Blip_Buffer* c, struct | |||
118 | Fm_apu_set_output( &this->fm_apu, c ); | 118 | Fm_apu_set_output( &this->fm_apu, c ); |
119 | } | 119 | } |
120 | 120 | ||
121 | blargg_err_t run_clocks( struct Sgc_Emu* this, blip_time_t* duration, int msec ) | 121 | static blargg_err_t run_clocks( struct Sgc_Emu* this, blip_time_t* duration, int msec ) |
122 | { | 122 | { |
123 | #if defined(ROCKBOX) | 123 | #if defined(ROCKBOX) |
124 | (void) msec; | 124 | (void) msec; |
@@ -207,7 +207,7 @@ void jsr( struct Sgc_Emu* this, byte addr [2] ) | |||
207 | this->cpu.r.pc = get_le16( addr ); | 207 | this->cpu.r.pc = get_le16( addr ); |
208 | } | 208 | } |
209 | 209 | ||
210 | void set_bank( struct Sgc_Emu* this, int bank, void const* data ) | 210 | static void set_bank( struct Sgc_Emu* this, int bank, void const* data ) |
211 | { | 211 | { |
212 | //dprintf( "map bank %d to %p\n", bank, (byte*) data - rom.at_addr( 0 ) ); | 212 | //dprintf( "map bank %d to %p\n", bank, (byte*) data - rom.at_addr( 0 ) ); |
213 | Z80_map_mem( &this->cpu, bank * this->rom.bank_size, this->rom.bank_size, this->unmapped_write, data ); | 213 | Z80_map_mem( &this->cpu, bank * this->rom.bank_size, this->rom.bank_size, this->unmapped_write, data ); |
@@ -408,7 +408,7 @@ blargg_err_t Sgc_start_track( struct Sgc_Emu* this, int track ) | |||
408 | 408 | ||
409 | // Tell/Seek | 409 | // Tell/Seek |
410 | 410 | ||
411 | blargg_long msec_to_samples( blargg_long msec, long sample_rate ) | 411 | static blargg_long msec_to_samples( blargg_long msec, long sample_rate ) |
412 | { | 412 | { |
413 | blargg_long sec = msec / 1000; | 413 | blargg_long sec = msec / 1000; |
414 | msec -= sec * 1000; | 414 | msec -= sec * 1000; |
@@ -509,7 +509,7 @@ static int int_log( blargg_long x, int step, int unit ) | |||
509 | return ((unit - fraction) + (fraction >> 1)) >> shift; | 509 | return ((unit - fraction) + (fraction >> 1)) >> shift; |
510 | } | 510 | } |
511 | 511 | ||
512 | void handle_fade( struct Sgc_Emu* this, long out_count, sample_t* out ) | 512 | static void handle_fade( struct Sgc_Emu* this, long out_count, sample_t* out ) |
513 | { | 513 | { |
514 | int i; | 514 | int i; |
515 | for ( i = 0; i < out_count; i += fade_block_size ) | 515 | for ( i = 0; i < out_count; i += fade_block_size ) |
@@ -533,7 +533,7 @@ void handle_fade( struct Sgc_Emu* this, long out_count, sample_t* out ) | |||
533 | 533 | ||
534 | // Silence detection | 534 | // Silence detection |
535 | 535 | ||
536 | void emu_play( struct Sgc_Emu* this, long count, sample_t* out ) | 536 | static void emu_play( struct Sgc_Emu* this, long count, sample_t* out ) |
537 | { | 537 | { |
538 | check( this->current_track_ >= 0 ); | 538 | check( this->current_track_ >= 0 ); |
539 | this->emu_time += count; | 539 | this->emu_time += count; |