forked from len0rd/rockbox
FS#12140 by Sean Bartell, Make various codec stuff static.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29942 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
05a1984eb3
commit
7c6056b352
14 changed files with 77 additions and 74 deletions
|
|
@ -433,14 +433,6 @@ struct Timer
|
|||
int counter;
|
||||
};
|
||||
|
||||
void Timer_run_( struct Timer* t, long time ) ICODE_ATTR_SPC;
|
||||
|
||||
static inline void Timer_run( struct Timer* t, long time )
|
||||
{
|
||||
if ( time >= t->next_tick )
|
||||
Timer_run_( t, time );
|
||||
}
|
||||
|
||||
struct Spc_Emu
|
||||
{
|
||||
uint8_t cycle_table [0x100];
|
||||
|
|
@ -490,14 +482,6 @@ static inline int DSP_read( struct Spc_Dsp* this, int i )
|
|||
return this->r.reg [i];
|
||||
}
|
||||
|
||||
void SPC_run_dsp_( THIS, long time ) ICODE_ATTR_SPC;
|
||||
|
||||
static inline void SPC_run_dsp( THIS, long time )
|
||||
{
|
||||
if ( time >= this->next_dsp )
|
||||
SPC_run_dsp_( this, time );
|
||||
}
|
||||
|
||||
int SPC_read( THIS, unsigned addr, long const time ) ICODE_ATTR_SPC;
|
||||
void SPC_write( THIS, unsigned addr, int data, long const time ) ICODE_ATTR_SPC;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ struct cpu_ram_t ram IBSS_ATTR_SPC_LARGE_IRAM CACHEALIGN_ATTR;
|
|||
|
||||
/**************** Timers ****************/
|
||||
|
||||
void Timer_run_( struct Timer* t, long time )
|
||||
static void Timer_run_( struct Timer* t, long time ) ICODE_ATTR_SPC;
|
||||
static void Timer_run_( struct Timer* t, long time )
|
||||
{
|
||||
/* when disabled, next_tick should always be in the future */
|
||||
assert( t->enabled );
|
||||
|
|
@ -50,6 +51,12 @@ void Timer_run_( struct Timer* t, long time )
|
|||
t->count = elapsed;
|
||||
}
|
||||
|
||||
static inline void Timer_run( struct Timer* t, long time )
|
||||
{
|
||||
if ( time >= t->next_tick )
|
||||
Timer_run_( t, time );
|
||||
}
|
||||
|
||||
/**************** SPC emulator ****************/
|
||||
/* 1.024 MHz clock / 32000 samples per second */
|
||||
|
||||
|
|
@ -179,7 +186,8 @@ int SPC_load_spc( THIS, const void* data, long size )
|
|||
}
|
||||
|
||||
/**************** DSP interaction ****************/
|
||||
void SPC_run_dsp_( THIS, long time )
|
||||
static void SPC_run_dsp_( THIS, long time ) ICODE_ATTR_SPC;
|
||||
static void SPC_run_dsp_( THIS, long time )
|
||||
{
|
||||
/* divide by CLOCKS_PER_SAMPLE */
|
||||
int count = ((time - this->next_dsp) >> 5) + 1;
|
||||
|
|
@ -189,6 +197,12 @@ void SPC_run_dsp_( THIS, long time )
|
|||
DSP_run( &this->dsp, count, buf );
|
||||
}
|
||||
|
||||
static inline void SPC_run_dsp( THIS, long time )
|
||||
{
|
||||
if ( time >= this->next_dsp )
|
||||
SPC_run_dsp_( this, time );
|
||||
}
|
||||
|
||||
int SPC_read( THIS, unsigned addr, long const time )
|
||||
{
|
||||
int result = RAM [addr];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue