summaryrefslogtreecommitdiff
path: root/apps/plugins/midi/guspat.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2007-04-11 10:48:50 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2007-04-11 10:48:50 +0000
commit7c4b786851ec90364c0335b46d093fb6dba1af01 (patch)
tree562892475a99808145cb6a35f4098cd2dc78ff15 /apps/plugins/midi/guspat.c
parent08e633c25c3f70d8d8b900cf09576986a398a474 (diff)
downloadrockbox-7c4b786851ec90364c0335b46d093fb6dba1af01.zip
rockbox-7c4b786851ec90364c0335b46d093fb6dba1af01.tar.gz
rockbox-7c4b786851ec90364c0335b46d093fb6dba1af01.tar.bz2
rockbox-7c4b786851ec90364c0335b46d093fb6dba1af01.tar.xz
Some quick and dirty MIDI player optimizations, now it works on the X5 and M5 too
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13108 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/midi/guspat.c')
-rw-r--r--apps/plugins/midi/guspat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/plugins/midi/guspat.c b/apps/plugins/midi/guspat.c
index 716c20d..983589f 100644
--- a/apps/plugins/midi/guspat.c
+++ b/apps/plugins/midi/guspat.c
@@ -29,9 +29,12 @@ unsigned int readDWord(int file)
return (readChar(file)<<0) | (readChar(file)<<8) | (readChar(file)<<16) | (readChar(file)<<24);
}
+int curr_waveform;
+struct GWaveform waveforms[32] IBSS_ATTR;
+
struct GWaveform * loadWaveform(int file)
{
- struct GWaveform * wav = (struct GWaveform *)malloc(sizeof(struct GWaveform));
+ struct GWaveform * wav = &waveforms[curr_waveform++];
rb->memset(wav, 0, sizeof(struct GWaveform));
wav->name=readData(file, 7);