summaryrefslogtreecommitdiff
path: root/apps/plugins/midi/guspat.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2008-07-27 20:36:45 +0000
committerNils Wallménius <nils@rockbox.org>2008-07-27 20:36:45 +0000
commit2d337dab7f6d32f8a0ddd035dd904b3f51909afb (patch)
tree333fa2ce3137b6967c3005cd745b326d2a071d7c /apps/plugins/midi/guspat.c
parentb2c4a9a0a95a62fa4ef9c5800f9e5ab014932a4d (diff)
downloadrockbox-2d337dab7f6d32f8a0ddd035dd904b3f51909afb.tar.gz
rockbox-2d337dab7f6d32f8a0ddd035dd904b3f51909afb.zip
FS#9221 by Christopher Williams fixing a couple of bugs in keybox
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18138 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/midi/guspat.c')
-rw-r--r--apps/plugins/midi/guspat.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/plugins/midi/guspat.c b/apps/plugins/midi/guspat.c
index 419cfa3ad0..1b310d2de8 100644
--- a/apps/plugins/midi/guspat.c
+++ b/apps/plugins/midi/guspat.c
@@ -162,10 +162,12 @@ struct GPatch * gusload(char * filename)
162 162
163 int file = rb->open(filename, O_RDONLY); 163 int file = rb->open(filename, O_RDONLY);
164 164
165 DEBUGF("filename: %s\n", filename);
166
165 if(file == -1) 167 if(file == -1)
166 { 168 {
167 char message[50]; 169 char message[MAX_PATH];
168 rb->snprintf(message, 50, "Error opening %s", filename); 170 rb->snprintf(message, MAX_PATH, "Error opening %s", filename);
169 rb->splash(HZ*2, message); 171 rb->splash(HZ*2, message);
170 return NULL; 172 return NULL;
171 } 173 }
@@ -197,12 +199,12 @@ struct GPatch * gusload(char * filename)
197 199
198/* printf("\nFILE: %s", filename); */ 200/* printf("\nFILE: %s", filename); */
199/* printf("\nlayerSamples=%d", gp->numWaves); */ 201/* printf("\nlayerSamples=%d", gp->numWaves); */
200 202DEBUGF("hej\n");
201 int a=0; 203 int a=0;
202 for(a=0; a<gp->numWaves; a++) 204 for(a=0; a<gp->numWaves; a++)
203 gp->waveforms[a] = loadWaveform(file); 205 gp->waveforms[a] = loadWaveform(file);
204 206
205 207DEBUGF("hej2\n");
206/* printf("\nPrecomputing note table"); */ 208/* printf("\nPrecomputing note table"); */
207 209
208 for(a=0; a<128; a++) 210 for(a=0; a<128; a++)
@@ -210,7 +212,7 @@ struct GPatch * gusload(char * filename)
210 gp->noteTable[a] = selectWaveform(gp, a); 212 gp->noteTable[a] = selectWaveform(gp, a);
211 } 213 }
212 rb->close(file); 214 rb->close(file);
213 215DEBUGF("hej3\n");
214 return gp; 216 return gp;
215} 217}
216 218