Skip to content

Commit

Permalink
The Windows native MIDI code now uses the common code as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 6, 2001
1 parent da1c28b commit 0fea160
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 306 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Expand Up @@ -3,7 +3,7 @@
lib_LTLIBRARIES = libSDL_mixer.la

SUBDIRS = @MUSIC_SUBDIRS@
DIST_SUBIDRS = mikmod timidity native_midi
DIST_SUBDIRS = mikmod timidity native_midi

libSDL_mixerincludedir = $(includedir)/SDL
libSDL_mixerinclude_HEADERS = \
Expand Down
Binary file modified VisualC.zip
Binary file not shown.
10 changes: 4 additions & 6 deletions native_midi/native_midi_common.c
Expand Up @@ -104,7 +104,7 @@ static MIDIEvent *MIDITracktoStream(MIDITrack *track)
{
Uint32 atime = 0;
Uint32 len = 0;
Uint8 event,type,a,b,c;
Uint8 event,type,a,b;
Uint8 laststatus = 0;
Uint8 lastchan = 0;
int currentPos = 0;
Expand Down Expand Up @@ -208,8 +208,7 @@ static MIDIEvent *MIDITracktoStream(MIDITrack *track)
}
}
}

end:

currentEvent = head->next;
free(head); /* release the dummy head event */
return currentEvent;
Expand All @@ -226,8 +225,7 @@ static MIDIEvent *MIDItoStream(MIDIFile *mididata)
MIDIEvent *head = CreateEvent(0,0,0,0); /* dummy event to make handling the list easier */
MIDIEvent *currentEvent = head;
int trackID;
int time = 0;


if (NULL == head)
return NULL;

Expand All @@ -239,7 +237,7 @@ static MIDIEvent *MIDItoStream(MIDIFile *mididata)
/* TODO */
while(1)
{
int lowestTime = INT_MAX;
Uint32 lowestTime = INT_MAX;
int currentTrackID = -1;

/* Find the next event */
Expand Down

0 comments on commit 0fea160

Please sign in to comment.