summaryrefslogtreecommitdiff
path: root/apps/plugins/midi
diff options
context:
space:
mode:
authorStepan Moskovchenko <stevenm@rockbox.org>2006-05-07 07:12:07 +0000
committerStepan Moskovchenko <stevenm@rockbox.org>2006-05-07 07:12:07 +0000
commit68af7bae87b0fa4f0da080752a73e638f2ecdf21 (patch)
tree2c76e67d62458c9406a2764eef91cc5bc14fd0a8 /apps/plugins/midi
parenta95068cf39a8ee4c6972502d924b35b73bfabbfd (diff)
downloadrockbox-68af7bae87b0fa4f0da080752a73e638f2ecdf21.zip
rockbox-68af7bae87b0fa4f0da080752a73e638f2ecdf21.tar.gz
rockbox-68af7bae87b0fa4f0da080752a73e638f2ecdf21.tar.bz2
rockbox-68af7bae87b0fa4f0da080752a73e638f2ecdf21.tar.xz
Added ability to adjust the volume during playback.
Gracefully fail if no soundset installed. Yet more messing with the ramping code. I swear, that will be the end of me. Basic skipping support- skip foreward a bit if Right is pressed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9883 a1c6a512-1295-4272-9138-f99709370657
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 13887e4..11f81b1 100644
--- a/apps/plugins/midi/midifile.c
+++ b/apps/plugins/midi/midifile.c
@@ -68,8 +68,6 @@ struct MIDIfile * loadFile(char * filename)
int track=0;
printf("\nFile has %d tracks.", mfload->numTracks);
- printf("Time division=%d\n", mfload->div);
-
while(! eof(file) && track < mfload->numTracks)
{
diff --git a/apps/plugins/midi/synth.c b/apps/plugins/midi/synth.c
index 2b70074..2ec263d 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)
drumUsed[getEvent(mf->tracks[a], ts)->d1]=1;
if( (getEvent(mf->tracks[a], ts)->status & 0xF0) == MIDI_PRGM)
- {
-/* if(patchUsed[getEvent(mf->tracks[a], ts)->d1]==0)
- printf("\nI need to load patch %d.", getEvent(mf->tracks[a], ts)->d1);
-*/
patchUsed[getEvent(mf->tracks[a], ts)->d1]=1;
- }
}
}
int file = rb->open(filename, O_RDONLY);
- if(file == -1)
+ if(file < 0)
{
- rb->splash(HZ*2, true, "Bad patch config.\nDid you install the patchset?");
+ printf("\n");
+ printf("\nNo MIDI patchset found.");
+ printf("\nPlease install the instruments.");
+ printf("\nSee Rockbox page for more info.");
+
+ rb->splash(HZ*2, true, "No Instruments");
+ rb->splash(HZ*2, true, "No Instruments");
return -1;
}
@@ -148,7 +149,7 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig)
rb->close(file);
file = rb->open(drumConfig, O_RDONLY);
- if(file == -1)
+ if(file < 0)
{
rb->splash(HZ*2, true, "Bad drum config.\nDid you install the patchset?");
return -1;