summaryrefslogtreecommitdiff
path: root/apps/plugins/midi/midiutil.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2011-09-06 10:34:20 +0000
committerNils Wallménius <nils@rockbox.org>2011-09-06 10:34:20 +0000
commit2afc175a4e2505c52bd0bae1469732d00f0eb5cb (patch)
tree8c79be6d4e847574102e2b138f1dc025df9101f3 /apps/plugins/midi/midiutil.c
parent2ac668e44cec12616a4d675f8eade8049ed10af9 (diff)
downloadrockbox-2afc175a4e2505c52bd0bae1469732d00f0eb5cb.tar.gz
rockbox-2afc175a4e2505c52bd0bae1469732d00f0eb5cb.zip
midi: make the patch sample data pointer a *int16_t to get rid of some ugly casting and drop an acessor macro to make caching the pointer in the synthVoice loop possible. Speeds up midi by 1-2% on cf and 3-5% on PP.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30438 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/midi/midiutil.c')
-rw-r--r--apps/plugins/midi/midiutil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/midi/midiutil.c b/apps/plugins/midi/midiutil.c
index f960b72654..f4950408ab 100644
--- a/apps/plugins/midi/midiutil.c
+++ b/apps/plugins/midi/midiutil.c
@@ -114,9 +114,9 @@ unsigned char readChar(int file)
114 return buf[0]; 114 return buf[0];
115} 115}
116 116
117unsigned char * readData(int file, int len) 117void * readData(int file, int len)
118{ 118{
119 unsigned char * dat = malloc(len); 119 void * dat = malloc(len);
120 rb->read(file, dat, len); 120 rb->read(file, dat, len);
121 return dat; 121 return dat;
122} 122}