summaryrefslogtreecommitdiff
path: root/apps/codecs/libspc
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2011-06-01 10:28:26 +0000
committerNils Wallménius <nils@rockbox.org>2011-06-01 10:28:26 +0000
commit7c6056b352e35c5b12521b35ba193e13f75500be (patch)
treea53215338a7c78bd47ebb3afedf41c0489a97f4e /apps/codecs/libspc
parent05a1984eb32dd07bcf5d54c147ace4d6f56a00b4 (diff)
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
Diffstat (limited to 'apps/codecs/libspc')
-rw-r--r--apps/codecs/libspc/spc_codec.h16
-rw-r--r--apps/codecs/libspc/spc_emu.c18
2 files changed, 16 insertions, 18 deletions
diff --git a/apps/codecs/libspc/spc_codec.h b/apps/codecs/libspc/spc_codec.h
index caa6860088..7f6b6e2e9f 100644
--- a/apps/codecs/libspc/spc_codec.h
+++ b/apps/codecs/libspc/spc_codec.h
@@ -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;
diff --git a/apps/codecs/libspc/spc_emu.c b/apps/codecs/libspc/spc_emu.c
index 0ad1329a6b..5ea5b0cdeb 100644
--- a/apps/codecs/libspc/spc_emu.c
+++ b/apps/codecs/libspc/spc_emu.c
@@ -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];