summaryrefslogtreecommitdiff
path: root/apps/codecs/spc/spc_dsp.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-01-24 13:35:13 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-01-24 13:35:13 +0000
commitef1f7d3bf980639d656ff6794ecdd0eb64207420 (patch)
tree64d4dcdbafcdbb2215e97d5591d6fbc18af040ec /apps/codecs/spc/spc_dsp.c
parent4cfae09f02f119dceb8e90ce439dbf43eb5203e7 (diff)
SPC Codec: Ensure no crash occurs on load failure which could cause emulation to be run without a program loaded on dual core (DSP wasn't initialized yet). The load failures come from core buffering not having the atomic audio file fully loaded before the codec requests the buffer (it gets as many bytes as can be provided) which IMHO isn't very atomic :). Changes in thread execution order after dumping spinlocks for general use simply revealed the buffering race condition. No fix for that will be hacked into the codec itself but should be fixed in the core. Add my copyright to files I had a significant part in developing per request of Adam Gashlin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16154 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/spc/spc_dsp.c')
-rw-r--r--apps/codecs/spc/spc_dsp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/codecs/spc/spc_dsp.c b/apps/codecs/spc/spc_dsp.c
index 19986fd8a8..dda80e93ce 100644
--- a/apps/codecs/spc/spc_dsp.c
+++ b/apps/codecs/spc/spc_dsp.c
@@ -7,6 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
+ * Copyright (C) 2007-2008 Michael Sevakis (jhMikeS)
* Copyright (C) 2006-2007 Adam Gashlin (hcs)
* Copyright (C) 2004-2007 Shay Green (blargg)
* Copyright (C) 2002 Brad Martin
@@ -31,7 +32,7 @@ int32_t fir_buf[FIR_BUF_CNT]
#endif
#if SPC_BRRCACHE
/* a little extra for samples that go past end */
-int16_t BRRcache [BRR_CACHE_SIZE];
+int16_t BRRcache [BRR_CACHE_SIZE] CACHEALIGN_ATTR;
#endif
void DSP_write( struct Spc_Dsp* this, int i, int data )