summaryrefslogtreecommitdiff
path: root/apps/codecs/mod.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2009-11-29 18:11:49 +0000
committerNils Wallménius <nils@rockbox.org>2009-11-29 18:11:49 +0000
commit13f08d70fd5ba237ae53aad1de8bb3d613010246 (patch)
treeab159172b0c4a8cf13f07f16e28008da4d732dfc /apps/codecs/mod.c
parent685ca2672e5842fe185c8f12da6bf108fd8f074f (diff)
downloadrockbox-13f08d70fd5ba237ae53aad1de8bb3d613010246.tar.gz
rockbox-13f08d70fd5ba237ae53aad1de8bb3d613010246.zip
Enable strict aliasing optimizations for codecs on gcc versions >= 4.0, fix alising violations that this uncovered, gives small speedups for most codecs, FS#10801
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23784 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/mod.c')
-rw-r--r--apps/codecs/mod.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/codecs/mod.c b/apps/codecs/mod.c
index 523e1c7d0b..cbeaf0837f 100644
--- a/apps/codecs/mod.c
+++ b/apps/codecs/mod.c
@@ -1097,16 +1097,16 @@ static inline int clip(int i)
1097 else return(i); 1097 else return(i);
1098} 1098}
1099 1099
1100STATICIRAM void synthrender(void *renderbuffer, int samplecount) ICODE_ATTR; 1100STATICIRAM void synthrender(int32_t *renderbuffer, int samplecount) ICODE_ATTR;
1101void synthrender(void *renderbuffer, int samplecount) 1101void synthrender(int32_t *renderbuffer, int samplecount)
1102{ 1102{
1103 /* 125bpm equals to 50Hz (= 0.02s) 1103 /* 125bpm equals to 50Hz (= 0.02s)
1104 * => one tick = mixingrate/50, 1104 * => one tick = mixingrate/50,
1105 * samples passing in one tick: 1105 * samples passing in one tick:
1106 * mixingrate/(bpm/2.5) = 2.5*mixingrate/bpm */ 1106 * mixingrate/(bpm/2.5) = 2.5*mixingrate/bpm */
1107 1107
1108 int *p_left = (int *) renderbuffer; /* int in rockbox */ 1108 int32_t *p_left = renderbuffer; /* int in rockbox */
1109 int *p_right = p_left+1; 1109 int32_t *p_right = p_left+1;
1110 signed short s; 1110 signed short s;
1111 int qf_distance, qf_distance2; 1111 int qf_distance, qf_distance2;
1112 1112