diff options
Diffstat (limited to 'apps/plugins/midi/midifile.c')
-rw-r--r-- | apps/plugins/midi/midifile.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/plugins/midi/midifile.c b/apps/plugins/midi/midifile.c index 32eeeec92b..7161818421 100644 --- a/apps/plugins/midi/midifile.c +++ b/apps/plugins/midi/midifile.c | |||
@@ -30,7 +30,7 @@ struct MIDIfile * loadFile(char * filename) | |||
30 | 30 | ||
31 | if(file==-1) | 31 | if(file==-1) |
32 | { | 32 | { |
33 | printf("Could not open file\n"); | 33 | printf("Could not open file"); |
34 | return NULL; | 34 | return NULL; |
35 | } | 35 | } |
36 | 36 | ||
@@ -39,7 +39,7 @@ struct MIDIfile * loadFile(char * filename) | |||
39 | if(mfload==NULL) | 39 | if(mfload==NULL) |
40 | { | 40 | { |
41 | rb->close(file); | 41 | rb->close(file); |
42 | printf("Could not allocate memory for MIDIfile struct\n"); | 42 | printf("Could not allocate memory for MIDIfile struct"); |
43 | return NULL; | 43 | return NULL; |
44 | } | 44 | } |
45 | 45 | ||
@@ -50,8 +50,8 @@ struct MIDIfile * loadFile(char * filename) | |||
50 | { | 50 | { |
51 | if(fileID == ID_RIFF) | 51 | if(fileID == ID_RIFF) |
52 | { | 52 | { |
53 | printf("\nDetected RMID file"); | 53 | printf("Detected RMID file"); |
54 | printf("\nLooking for MThd header"); | 54 | printf("Looking for MThd header"); |
55 | char dummy[17]; | 55 | char dummy[17]; |
56 | rb->read(file, &dummy, 16); | 56 | rb->read(file, &dummy, 16); |
57 | if(readID(file) != ID_MTHD) | 57 | if(readID(file) != ID_MTHD) |
@@ -88,7 +88,7 @@ struct MIDIfile * loadFile(char * filename) | |||
88 | 88 | ||
89 | int track=0; | 89 | int track=0; |
90 | 90 | ||
91 | printf("\nFile has %d tracks.", mfload->numTracks); | 91 | printf("File has %d tracks.", mfload->numTracks); |
92 | 92 | ||
93 | while(! eof(file) && track < mfload->numTracks) | 93 | while(! eof(file) && track < mfload->numTracks) |
94 | { | 94 | { |
@@ -99,7 +99,7 @@ struct MIDIfile * loadFile(char * filename) | |||
99 | { | 99 | { |
100 | if(mfload->numTracks != track) | 100 | if(mfload->numTracks != track) |
101 | { | 101 | { |
102 | printf("\nError: file claims to have %d tracks.\n I only see %d here.\n", mfload->numTracks, track); | 102 | printf("Error: file claims to have %d tracks. I only see %d here.", mfload->numTracks, track); |
103 | mfload->numTracks = track; | 103 | mfload->numTracks = track; |
104 | } | 104 | } |
105 | return mfload; | 105 | return mfload; |
@@ -111,7 +111,7 @@ struct MIDIfile * loadFile(char * filename) | |||
111 | track++; | 111 | track++; |
112 | } else | 112 | } else |
113 | { | 113 | { |
114 | printf("\n SKIPPING TRACK"); | 114 | printf("SKIPPING TRACK"); |
115 | int len = readFourBytes(file); | 115 | int len = readFourBytes(file); |
116 | while(--len) | 116 | while(--len) |
117 | readChar(file); | 117 | readChar(file); |
@@ -223,7 +223,7 @@ struct Track * readTrack(int file) | |||
223 | { | 223 | { |
224 | if(trackSize < dataPtr-trk->dataBlock) | 224 | if(trackSize < dataPtr-trk->dataBlock) |
225 | { | 225 | { |
226 | printf("\nTrack parser memory out of bounds"); | 226 | printf("Track parser memory out of bounds"); |
227 | exit(1); | 227 | exit(1); |
228 | } | 228 | } |
229 | dataPtr+=sizeof(struct Event); | 229 | dataPtr+=sizeof(struct Event); |
@@ -245,7 +245,7 @@ int readID(int file) | |||
245 | id[a]=readChar(file); | 245 | id[a]=readChar(file); |
246 | if(eof(file)) | 246 | if(eof(file)) |
247 | { | 247 | { |
248 | printf("\nEnd of file reached."); | 248 | printf("End of file reached."); |
249 | return ID_EOF; | 249 | return ID_EOF; |
250 | } | 250 | } |
251 | if(rb->strcmp(id, "MThd")==0) | 251 | if(rb->strcmp(id, "MThd")==0) |