michael at surfnetcity.com.au wrote:
How about this (based on knowledge of MIDI, not platform-dependencies):
/* Buffer the MIDI file (removing reliance on disk I/O) */
SDL_MIDI *SDL_LoadMIDI(char *file)/* Start and stop playing the song, returning 1 for success and 0 for failure
(failure should be fatal) */
int SDL_PlayMIDI(SDL_MIDI *song)
int SDL_StopMIDI(SDL_MIDI *song)/* Get a list of sequencer devices */
SDL_MIDIList *SDL_ListSequencers()/* Open a device, returning 1 for success and 0 for failure - SDL_MIDIDev should
be part of SDL_MIDIList */
int SDL_OpenSequencer(SDL_MIDIDev *sequencer)/* Free up the memory taken by the MIDI song */
SDL_FreeMIDI(SDL_MIDI *song)Note: I’m not sure about making it thread safe… (I’m not sure about making
anything thread-safe for that matter)Also, before anybody complains about no rewind/fastforward seeking, that will
NOT work with MIDI easily, and the benefits would be limited.
This seems like a good place to start. I will get working on it. BTW, I
only have access to Unixoids and Win32, so the Be (and Mac?) stuff is
completely out of my reach.
M.Watson