Recommended Posts

SDL_Mixer allows you to load MIDIs, which is great. The only problem is that I want to be able to load MIDIs from archive files that I create, and there is no Mix_LoadMIDI_RW() function. I need some way to load MIDI files into either the SDL_AudioSpec struct, or the Mix_Chunk/Mix_Music struct. This would be easy for .voc or .wav files, but since MIDI data is not a digital waveform, I have no idea how to do this. Any ideas?
[Edited by - Drakkcon on August 28, 2005 6:45:18 PM]

Link to post

Share on other sites

Share this post

Link to post

Share on other sites

I have no idea, having never worked with the library before...However, for the sake of giving a reply, there's always the nasty ol' option of copying the data to a temporary file at runtime and loading it from there (since MIDI files are small, it shouldn't be too slow anyway [wink])...

0

Share this post

Link to post

Share on other sites

Yes, it seems that this is not a very common issue, so I may have to do what you've suggested. I've been looking through the 'timidity' source code to see if I can find a way to do it my way, but you're right, they're only like 4kb each.So that's probably what I'll do.