summaryrefslogtreecommitdiff
path: root/apps/codecs/libspc/spc_codec.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libspc/spc_codec.h')
-rw-r--r--apps/codecs/libspc/spc_codec.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/apps/codecs/libspc/spc_codec.h b/apps/codecs/libspc/spc_codec.h
index 923645b4aa..cf72f90af4 100644
--- a/apps/codecs/libspc/spc_codec.h
+++ b/apps/codecs/libspc/spc_codec.h
@@ -137,16 +137,15 @@ static inline void set_le16( void* p, unsigned n )
137} 137}
138 138
139#define GET_LE16( addr ) get_le16( addr ) 139#define GET_LE16( addr ) get_le16( addr )
140#define GET_LE16A( addr ) get_le16( addr )
140#define SET_LE16( addr, data ) set_le16( addr, data ) 141#define SET_LE16( addr, data ) set_le16( addr, data )
141#define INT16A( addr ) (*(uint16_t*) (addr)) 142#define INT16A( addr ) (*(uint16_t*) (addr))
142#define INT16SA( addr ) (*(int16_t*) (addr)) 143#define INT16SA( addr ) (*(int16_t*) (addr))
143 144
144#ifdef ROCKBOX_LITTLE_ENDIAN 145#ifdef ROCKBOX_LITTLE_ENDIAN
145 #define GET_LE16A( addr ) (*(uint16_t*) (addr))
146 #define GET_LE16SA( addr ) (*( int16_t*) (addr)) 146 #define GET_LE16SA( addr ) (*( int16_t*) (addr))
147 #define SET_LE16A( addr, data ) (void) (*(uint16_t*) (addr) = (data)) 147 #define SET_LE16A( addr, data ) (void) (*(uint16_t*) (addr) = (data))
148#else 148#else
149 #define GET_LE16A( addr ) get_le16 ( addr )
150 #define GET_LE16SA( addr ) get_le16s( addr ) 149 #define GET_LE16SA( addr ) get_le16s( addr )
151 #define SET_LE16A( addr, data ) set_le16 ( addr, data ) 150 #define SET_LE16A( addr, data ) set_le16 ( addr, data )
152#endif 151#endif
@@ -166,13 +165,22 @@ struct cpu_regs_t
166 uint8_t sp; 165 uint8_t sp;
167}; 166};
168 167
168struct src_dir
169{
170 uint16_t start;
171 uint16_t loop;
172};
173
169struct cpu_ram_t 174struct cpu_ram_t
170{ 175{
171 union { 176 union {
172 uint8_t padding1 [0x100]; 177 uint8_t padding1 [0x100];
173 uint16_t align; 178 uint16_t align;
174 } padding1 [1]; 179 } padding1 [1];
175 uint8_t ram [0x10000]; 180 union {
181 uint8_t ram [0x10000];
182 struct src_dir sd [0x10000/sizeof(struct src_dir)];
183 };
176 uint8_t padding2 [0x100]; 184 uint8_t padding2 [0x100];
177}; 185};
178 186
@@ -339,12 +347,6 @@ struct Spc_Dsp
339#endif 347#endif
340}; 348};
341 349
342struct src_dir
343{
344 char start [2];
345 char loop [2];
346};
347
348void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf ) ICODE_ATTR; 350void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf ) ICODE_ATTR;
349void DSP_reset( struct Spc_Dsp* this ); 351void DSP_reset( struct Spc_Dsp* this );
350 352