summaryrefslogtreecommitdiff
path: root/apps/codecs/libgme/hes_emu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libgme/hes_emu.c')
-rw-r--r--apps/codecs/libgme/hes_emu.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/apps/codecs/libgme/hes_emu.c b/apps/codecs/libgme/hes_emu.c
index 3ef87d9f71..a428bee3fd 100644
--- a/apps/codecs/libgme/hes_emu.c
+++ b/apps/codecs/libgme/hes_emu.c
@@ -29,7 +29,7 @@ int const silence_threshold = 0x10;
29long const fade_block_size = 512; 29long const fade_block_size = 512;
30int const fade_shift = 8; // fade ends with gain at 1.0 / (1 << fade_shift) 30int const fade_shift = 8; // fade ends with gain at 1.0 / (1 << fade_shift)
31 31
32const char gme_wrong_file_type [] ICONST_ATTR = "Wrong file type for this emulator"; 32const char gme_wrong_file_type [] = "Wrong file type for this emulator";
33 33
34static void clear_track_vars( struct Hes_Emu* this ) 34static void clear_track_vars( struct Hes_Emu* this )
35{ 35{
@@ -151,7 +151,7 @@ blargg_err_t Hes_load( struct Hes_Emu* this, void* data, long size )
151 151
152// Emulation 152// Emulation
153 153
154void recalc_timer_load( struct Hes_Emu* this ) ICODE_ATTR; 154void recalc_timer_load( struct Hes_Emu* this );
155void recalc_timer_load( struct Hes_Emu* this ) 155void recalc_timer_load( struct Hes_Emu* this )
156{ 156{
157 this->timer.load = this->timer.raw_load * this->timer_base + 1; 157 this->timer.load = this->timer.raw_load * this->timer_base + 1;
@@ -159,8 +159,8 @@ void recalc_timer_load( struct Hes_Emu* this )
159 159
160// Hardware 160// Hardware
161 161
162void irq_changed( struct Hes_Emu* this ) ICODE_ATTR; 162void irq_changed( struct Hes_Emu* this );
163void run_until( struct Hes_Emu* this, hes_time_t present ) ICODE_ATTR; 163void run_until( struct Hes_Emu* this, hes_time_t present );
164void Cpu_write_vdp( struct Hes_Emu* this, int addr, int data ) 164void Cpu_write_vdp( struct Hes_Emu* this, int addr, int data )
165{ 165{
166 switch ( addr ) 166 switch ( addr )
@@ -419,7 +419,7 @@ void irq_changed( struct Hes_Emu* this )
419 this->cpu.end_time, (this->cpu.irq_time = time) ); 419 this->cpu.end_time, (this->cpu.irq_time = time) );
420} 420}
421 421
422static void adjust_time( blargg_long* time, hes_time_t delta ) ICODE_ATTR; 422static void adjust_time( blargg_long* time, hes_time_t delta );
423static void adjust_time( blargg_long* time, hes_time_t delta ) 423static void adjust_time( blargg_long* time, hes_time_t delta )
424{ 424{
425 if ( *time < (blargg_long)future_hes_time ) 425 if ( *time < (blargg_long)future_hes_time )
@@ -430,7 +430,7 @@ static void adjust_time( blargg_long* time, hes_time_t delta )
430 } 430 }
431} 431}
432 432
433blargg_err_t run_clocks( struct Hes_Emu* this, blip_time_t* duration_ ) ICODE_ATTR; 433blargg_err_t run_clocks( struct Hes_Emu* this, blip_time_t* duration_ );
434blargg_err_t run_clocks( struct Hes_Emu* this, blip_time_t* duration_ ) 434blargg_err_t run_clocks( struct Hes_Emu* this, blip_time_t* duration_ )
435{ 435{
436 blip_time_t duration = *duration_; // cache 436 blip_time_t duration = *duration_; // cache
@@ -463,7 +463,7 @@ blargg_err_t run_clocks( struct Hes_Emu* this, blip_time_t* duration_ )
463 return 0; 463 return 0;
464} 464}
465 465
466blargg_err_t play_( struct Hes_Emu* this, long count, sample_t* out ) ICODE_ATTR; 466blargg_err_t play_( struct Hes_Emu* this, long count, sample_t* out );
467blargg_err_t play_( struct Hes_Emu* this, long count, sample_t* out ) 467blargg_err_t play_( struct Hes_Emu* this, long count, sample_t* out )
468{ 468{
469 long remain = count; 469 long remain = count;
@@ -557,7 +557,7 @@ void Sound_set_tempo( struct Hes_Emu* this, int t )
557 this->tempo_ = t; 557 this->tempo_ = t;
558} 558}
559 559
560void fill_buf( struct Hes_Emu* this ) ICODE_ATTR; 560void fill_buf( struct Hes_Emu* this );
561blargg_err_t Hes_start_track( struct Hes_Emu* this, int track ) 561blargg_err_t Hes_start_track( struct Hes_Emu* this, int track )
562{ 562{
563 clear_track_vars( this ); 563 clear_track_vars( this );
@@ -654,7 +654,7 @@ blargg_err_t Track_seek( struct Hes_Emu* this, long msec )
654 return Track_skip( this, time - this->out_time ); 654 return Track_skip( this, time - this->out_time );
655} 655}
656 656
657blargg_err_t skip_( struct Hes_Emu* this, long count ) ICODE_ATTR; 657blargg_err_t skip_( struct Hes_Emu* this, long count );
658blargg_err_t skip_( struct Hes_Emu* this, long count ) 658blargg_err_t skip_( struct Hes_Emu* this, long count )
659{ 659{
660 // for long skip, mute sound 660 // for long skip, mute sound
@@ -726,7 +726,7 @@ void Track_set_fade( struct Hes_Emu* this, long start_msec, long length_msec )
726} 726}
727 727
728// unit / pow( 2.0, (double) x / step ) 728// unit / pow( 2.0, (double) x / step )
729static int int_log( blargg_long x, int step, int unit ) ICODE_ATTR; 729static int int_log( blargg_long x, int step, int unit );
730static int int_log( blargg_long x, int step, int unit ) 730static int int_log( blargg_long x, int step, int unit )
731{ 731{
732 int shift = x / step; 732 int shift = x / step;
@@ -734,7 +734,7 @@ static int int_log( blargg_long x, int step, int unit )
734 return ((unit - fraction) + (fraction >> 1)) >> shift; 734 return ((unit - fraction) + (fraction >> 1)) >> shift;
735} 735}
736 736
737void handle_fade( struct Hes_Emu* this, long out_count, sample_t* out ) ICODE_ATTR; 737void handle_fade( struct Hes_Emu* this, long out_count, sample_t* out );
738void handle_fade( struct Hes_Emu* this, long out_count, sample_t* out ) 738void handle_fade( struct Hes_Emu* this, long out_count, sample_t* out )
739{ 739{
740 int i; 740 int i;
@@ -759,7 +759,7 @@ void handle_fade( struct Hes_Emu* this, long out_count, sample_t* out )
759 759
760// Silence detection 760// Silence detection
761 761
762void emu_play( struct Hes_Emu* this, long count, sample_t* out ) ICODE_ATTR; 762void emu_play( struct Hes_Emu* this, long count, sample_t* out );
763void emu_play( struct Hes_Emu* this, long count, sample_t* out ) 763void emu_play( struct Hes_Emu* this, long count, sample_t* out )
764{ 764{
765 check( current_track_ >= 0 ); 765 check( current_track_ >= 0 );
@@ -775,7 +775,7 @@ void emu_play( struct Hes_Emu* this, long count, sample_t* out )
775} 775}
776 776
777// number of consecutive silent samples at end 777// number of consecutive silent samples at end
778static long count_silence( sample_t* begin, long size ) ICODE_ATTR; 778static long count_silence( sample_t* begin, long size );
779static long count_silence( sample_t* begin, long size ) 779static long count_silence( sample_t* begin, long size )
780{ 780{
781 sample_t first = *begin; 781 sample_t first = *begin;