summaryrefslogtreecommitdiff
path: root/apps/codecs/libspc/spc_dsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libspc/spc_dsp.c')
-rw-r--r--apps/codecs/libspc/spc_dsp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/codecs/libspc/spc_dsp.c b/apps/codecs/libspc/spc_dsp.c
index b4fc57158b..4b289caeda 100644
--- a/apps/codecs/libspc/spc_dsp.c
+++ b/apps/codecs/libspc/spc_dsp.c
@@ -28,8 +28,7 @@
28#include "spc_profiler.h" 28#include "spc_profiler.h"
29 29
30#if defined(CPU_COLDFIRE) || defined (CPU_ARM) 30#if defined(CPU_COLDFIRE) || defined (CPU_ARM)
31int32_t fir_buf[FIR_BUF_CNT] 31int32_t fir_buf[FIR_BUF_CNT] IBSS_ATTR_SPC MEM_ALIGN_ATTR;
32 __attribute__ ((aligned (FIR_BUF_ALIGN*1))) IBSS_ATTR;
33#endif 32#endif
34#if SPC_BRRCACHE 33#if SPC_BRRCACHE
35/* a little extra for samples that go past end */ 34/* a little extra for samples that go past end */
@@ -80,7 +79,7 @@ void DSP_write( struct Spc_Dsp* this, int i, int data )
80#if SPC_BRRCACHE 79#if SPC_BRRCACHE
81static void decode_brr( struct Spc_Dsp* this, unsigned start_addr, 80static void decode_brr( struct Spc_Dsp* this, unsigned start_addr,
82 struct voice_t* voice, 81 struct voice_t* voice,
83 struct raw_voice_t const* const raw_voice ) ICODE_ATTR; 82 struct raw_voice_t const* const raw_voice ) ICODE_ATTR_SPC;
84static void decode_brr( struct Spc_Dsp* this, unsigned start_addr, 83static void decode_brr( struct Spc_Dsp* this, unsigned start_addr,
85 struct voice_t* voice, 84 struct voice_t* voice,
86 struct raw_voice_t const* const raw_voice ) 85 struct raw_voice_t const* const raw_voice )
@@ -248,7 +247,7 @@ wave_in_cache:;
248static void key_on(struct Spc_Dsp* const this, struct voice_t* const voice, 247static void key_on(struct Spc_Dsp* const this, struct voice_t* const voice,
249 struct src_dir const* const sd, 248 struct src_dir const* const sd,
250 struct raw_voice_t const* const raw_voice, 249 struct raw_voice_t const* const raw_voice,
251 const int key_on_delay, const int vbit) ICODE_ATTR; 250 const int key_on_delay, const int vbit) ICODE_ATTR_SPC;
252static void key_on(struct Spc_Dsp* const this, struct voice_t* const voice, 251static void key_on(struct Spc_Dsp* const this, struct voice_t* const voice,
253 struct src_dir const* const sd, 252 struct src_dir const* const sd,
254 struct raw_voice_t const* const raw_voice, 253 struct raw_voice_t const* const raw_voice,
@@ -385,7 +384,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf )
385 384
386 /* each rate divides exactly into 0x7800 without remainder */ 385 /* each rate divides exactly into 0x7800 without remainder */
387 int const env_rate_init = 0x7800; 386 int const env_rate_init = 0x7800;
388 static unsigned short const env_rates [0x20] ICONST_ATTR = 387 static unsigned short const env_rates [0x20] ICONST_ATTR_SPC =
389 { 388 {
390 0x0000, 0x000F, 0x0014, 0x0018, 0x001E, 0x0028, 0x0030, 0x003C, 389 0x0000, 0x000F, 0x0014, 0x0018, 0x001E, 0x0028, 0x0030, 0x003C,
391 0x0050, 0x0060, 0x0078, 0x00A0, 0x00C0, 0x00F0, 0x0140, 0x0180, 390 0x0050, 0x0060, 0x0078, 0x00A0, 0x00C0, 0x00F0, 0x0140, 0x0180,
@@ -767,7 +766,7 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf )
767 #if !SPC_NOINTERP 766 #if !SPC_NOINTERP
768 /* Interleved gauss table (to improve cache coherency). */ 767 /* Interleved gauss table (to improve cache coherency). */
769 /* gauss [i * 2 + j] = normal_gauss [(1 - j) * 256 + i] */ 768 /* gauss [i * 2 + j] = normal_gauss [(1 - j) * 256 + i] */
770 static short const gauss [512] = 769 static short const gauss [512] ICONST_ATTR_SPC =
771 { 770 {
772370,1305, 366,1305, 362,1304, 358,1304, 354,1304, 351,1304, 347,1304, 343,1303, 771370,1305, 366,1305, 362,1304, 358,1304, 354,1304, 351,1304, 347,1304, 343,1303,
773339,1303, 336,1303, 332,1302, 328,1302, 325,1301, 321,1300, 318,1300, 314,1299, 772339,1303, 336,1303, 332,1302, 328,1302, 325,1301, 321,1300, 318,1300, 314,1299,