diff options
| author | Nils Wallménius <nils@rockbox.org> | 2007-10-03 20:38:04 +0000 |
|---|---|---|
| committer | Nils Wallménius <nils@rockbox.org> | 2007-10-03 20:38:04 +0000 |
| commit | 4ebe69293caa4bfbd1f554a563b1616ab5e87e8f (patch) | |
| tree | 68d6b7147f541e8d8dc9ceb9df3e1f32b0ab5c9f /apps/plugins/midi/midifile.c | |
| parent | 1ba018bb0194c7f00b163cc38a0ae57464705dcf (diff) | |
| download | rockbox-4ebe69293caa4bfbd1f554a563b1616ab5e87e8f.zip rockbox-4ebe69293caa4bfbd1f554a563b1616ab5e87e8f.tar.gz rockbox-4ebe69293caa4bfbd1f554a563b1616ab5e87e8f.tar.bz2 rockbox-4ebe69293caa4bfbd1f554a563b1616ab5e87e8f.tar.xz | |
Put a struct in iram for a small speedup on coldfire
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14973 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/midi/midifile.c')
| -rw-r--r-- | apps/plugins/midi/midifile.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/plugins/midi/midifile.c b/apps/plugins/midi/midifile.c index 1fa648f..7b59ed2 100644 --- a/apps/plugins/midi/midifile.c +++ b/apps/plugins/midi/midifile.c @@ -24,6 +24,8 @@ extern struct plugin_api * rb; struct Track * readTrack(int file); int readID(int file); +struct MIDIfile midi_file IBSS_ATTR; + struct MIDIfile * loadFile(char * filename) { struct MIDIfile * mfload; @@ -35,14 +37,7 @@ struct MIDIfile * loadFile(char * filename) return NULL; } - mfload = (struct MIDIfile*)malloc(sizeof(struct MIDIfile)); - - if(mfload==NULL) - { - rb->close(file); - printf("Could not allocate memory for MIDIfile struct"); - return NULL; - } + mfload = &midi_file; rb->memset(mfload, 0, sizeof(struct MIDIfile)); |