summaryrefslogtreecommitdiff
path: root/apps/codecs/libgme/gb_oscs.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libgme/gb_oscs.c')
-rw-r--r--apps/codecs/libgme/gb_oscs.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/codecs/libgme/gb_oscs.c b/apps/codecs/libgme/gb_oscs.c
index b136e3b218..09bb98238e 100644
--- a/apps/codecs/libgme/gb_oscs.c
+++ b/apps/codecs/libgme/gb_oscs.c
@@ -30,7 +30,7 @@ void Osc_reset( struct Gb_Osc* this )
30 this->enabled = false; 30 this->enabled = false;
31} 31}
32 32
33inline void Osc_update_amp( struct Gb_Osc* this, blip_time_t time, int new_amp ) 33static inline void Osc_update_amp( struct Gb_Osc* this, blip_time_t time, int new_amp )
34{ 34{
35 Blip_set_modified( this->output ); 35 Blip_set_modified( this->output );
36 int delta = new_amp - this->last_amp; 36 int delta = new_amp - this->last_amp;
@@ -76,14 +76,14 @@ void Square_clock_envelope( struct Gb_Square* this )
76 } 76 }
77} 77}
78 78
79inline void reload_sweep_timer( struct Gb_Square* this ) 79static inline void reload_sweep_timer( struct Gb_Square* this )
80{ 80{
81 this->sweep_delay = (this->osc.regs [0] & period_mask) >> 4; 81 this->sweep_delay = (this->osc.regs [0] & period_mask) >> 4;
82 if ( !this->sweep_delay ) 82 if ( !this->sweep_delay )
83 this->sweep_delay = 8; 83 this->sweep_delay = 8;
84} 84}
85 85
86void calc_sweep( struct Gb_Square* this, bool update ) 86static void calc_sweep( struct Gb_Square* this, bool update )
87{ 87{
88 struct Gb_Osc* osc = &this->osc; 88 struct Gb_Osc* osc = &this->osc;
89 int const shift = osc->regs [0] & shift_mask; 89 int const shift = osc->regs [0] & shift_mask;
@@ -234,7 +234,7 @@ static inline void Square_zombie_volume( struct Gb_Square* this, int old, int da
234 this->volume = v & 0x0F; 234 this->volume = v & 0x0F;
235} 235}
236 236
237bool Square_write_register( struct Gb_Square* this, int frame_phase, int reg, int old_data, int data ) 237static bool Square_write_register( struct Gb_Square* this, int frame_phase, int reg, int old_data, int data )
238{ 238{
239 int const max_len = 64; 239 int const max_len = 64;
240 240
@@ -275,7 +275,7 @@ bool Square_write_register( struct Gb_Square* this, int frame_phase, int reg, in
275 return false; 275 return false;
276} 276}
277 277
278inline void Noise_write_register( struct Gb_Noise* this, int frame_phase, int reg, int old_data, int data ) 278static inline void Noise_write_register( struct Gb_Noise* this, int frame_phase, int reg, int old_data, int data )
279{ 279{
280 int const max_len = 64; 280 int const max_len = 64;
281 281
@@ -315,7 +315,7 @@ inline void Noise_write_register( struct Gb_Noise* this, int frame_phase, int re
315 } 315 }
316} 316}
317 317
318inline void Sweep_write_register( struct Gb_Square* this, int frame_phase, int reg, int old_data, int data ) 318static inline void Sweep_write_register( struct Gb_Square* this, int frame_phase, int reg, int old_data, int data )
319{ 319{
320 if ( reg == 0 && this->sweep_enabled && this->sweep_neg && !(data & 0x08) ) 320 if ( reg == 0 && this->sweep_enabled && this->sweep_neg && !(data & 0x08) )
321 this->osc.enabled = false; // sweep negate disabled after used 321 this->osc.enabled = false; // sweep negate disabled after used
@@ -331,7 +331,7 @@ inline void Sweep_write_register( struct Gb_Square* this, int frame_phase, int r
331 } 331 }
332} 332}
333 333
334void corrupt_wave( struct Gb_Wave* this ) 334static void corrupt_wave( struct Gb_Wave* this )
335{ 335{
336 int pos = ((this->osc.phase + 1) & (wave_bank_size - 1)) >> 1; 336 int pos = ((this->osc.phase + 1) & (wave_bank_size - 1)) >> 1;
337 if ( pos < 4 ) 337 if ( pos < 4 )
@@ -343,7 +343,7 @@ void corrupt_wave( struct Gb_Wave* this )
343 } 343 }
344} 344}
345 345
346inline void Wave_write_register( struct Gb_Wave* this, int frame_phase, int reg, int old_data, int data ) 346static inline void Wave_write_register( struct Gb_Wave* this, int frame_phase, int reg, int old_data, int data )
347{ 347{
348 int const max_len = 256; 348 int const max_len = 256;
349 349