summaryrefslogtreecommitdiff
path: root/apps/plugins/midi
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/midi')
-rw-r--r--apps/plugins/midi/midifile.c2
-rw-r--r--apps/plugins/midi/synth.c17
2 files changed, 9 insertions, 10 deletions
diff --git a/apps/plugins/midi/midifile.c b/apps/plugins/midi/midifile.c
index 13887e4a98..11f81b1fd6 100644
--- a/apps/plugins/midi/midifile.c
+++ b/apps/plugins/midi/midifile.c
@@ -68,8 +68,6 @@ struct MIDIfile * loadFile(char * filename)
68 int track=0; 68 int track=0;
69 69
70 printf("\nFile has %d tracks.", mfload->numTracks); 70 printf("\nFile has %d tracks.", mfload->numTracks);
71 printf("Time division=%d\n", mfload->div);
72
73 71
74 while(! eof(file) && track < mfload->numTracks) 72 while(! eof(file) && track < mfload->numTracks)
75 { 73 {
diff --git a/apps/plugins/midi/synth.c b/apps/plugins/midi/synth.c
index 2b70074158..2ec263da60 100644
--- a/apps/plugins/midi/synth.c
+++ b/apps/plugins/midi/synth.c
@@ -103,19 +103,20 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig)
103 drumUsed[getEvent(mf->tracks[a], ts)->d1]=1; 103 drumUsed[getEvent(mf->tracks[a], ts)->d1]=1;
104 104
105 if( (getEvent(mf->tracks[a], ts)->status & 0xF0) == MIDI_PRGM) 105 if( (getEvent(mf->tracks[a], ts)->status & 0xF0) == MIDI_PRGM)
106 {
107/* if(patchUsed[getEvent(mf->tracks[a], ts)->d1]==0)
108 printf("\nI need to load patch %d.", getEvent(mf->tracks[a], ts)->d1);
109*/
110 patchUsed[getEvent(mf->tracks[a], ts)->d1]=1; 106 patchUsed[getEvent(mf->tracks[a], ts)->d1]=1;
111 }
112 } 107 }
113 } 108 }
114 109
115 int file = rb->open(filename, O_RDONLY); 110 int file = rb->open(filename, O_RDONLY);
116 if(file == -1) 111 if(file < 0)
117 { 112 {
118 rb->splash(HZ*2, true, "Bad patch config.\nDid you install the patchset?"); 113 printf("\n");
114 printf("\nNo MIDI patchset found.");
115 printf("\nPlease install the instruments.");
116 printf("\nSee Rockbox page for more info.");
117
118 rb->splash(HZ*2, true, "No Instruments");
119 rb->splash(HZ*2, true, "No Instruments");
119 return -1; 120 return -1;
120 } 121 }
121 122
@@ -148,7 +149,7 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig)
148 rb->close(file); 149 rb->close(file);
149 150
150 file = rb->open(drumConfig, O_RDONLY); 151 file = rb->open(drumConfig, O_RDONLY);
151 if(file == -1) 152 if(file < 0)
152 { 153 {
153 rb->splash(HZ*2, true, "Bad drum config.\nDid you install the patchset?"); 154 rb->splash(HZ*2, true, "Bad drum config.\nDid you install the patchset?");
154 return -1; 155 return -1;