Re: [AD] tiny seekmidi fix |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> I attach a new patch, because this means also allegro._tx needed to be
> modified.
diff -u -r1.14 midi.c
--- src/midi.c 21 Mar 2002 09:33:45 -0000 1.14
+++ src/midi.c 16 Aug 2002 06:13:57 -0000
@@ -1341,7 +1341,7 @@
prepare_to_play(midifile);
/* now sit back and let midi_player get to the position */
- while ((midi_pos < target) && (midi_pos != -1)) {
+ while ((midi_pos < target) && (midi_pos >= 0)) {
int mmpc = midi_pos_counter;
int mmp = midi_pos;
@@ -1362,7 +1362,7 @@
midi_driver = old_driver;
midi_seeking = 0;
- if (midi_pos != -1) {
+ if (midi_pos >= 0) {
/* refresh the driver with any changed parameters */
if (midi_driver->raw_midi) {
for (c=0; c<16; c++) {
Ok, definitively this time :-) While you are at it, could you correct
the comment line 1397 ?
diff -u -r1.69 allegro._tx
--- docs/src/allegro._tx 14 Aug 2002 19:36:15 -0000 1.69
+++ docs/src/allegro._tx 16 Aug 2002 06:14:29 -0000
@@ -5498,8 +5498,8 @@
beginning; otherwise it seeks from the current position. Returns zero if
successful, non-zero if it hit the end of the file (1 means it stopped
playing, 2 means it looped back to the start). If this function stops
- because it reached EOF, midi_pos will be set to the negative length of
- the MIDI file.
+ because it reached EOF, and no looping is in effect, midi_pos will be
+ set to the negative length of the MIDI file.
I think it would be better to merge the last sentence into the previous one.
- Eric