wesleyjohnson
Member
Posts: 447
Registered: 04-09 |
I do not program Windows anymore, and I do not know if this even works in Linux, but a thought is to fork a separate process just to play the midi, and let Windows pause that one. Then you can do a proper communication with the new process to tell it which MIDI to play.
I know that Legacy runs three processes to play a game, and one is doing the music.
Of course, you may already be using a separate music process,
or Windows could be stopping all I/O to do some MIDI thing, or
Windows could be running a high-priority task (that is in a wait loop)
to get the MIDI started (because some media player needed it that way) and I wouldn't be surprised if it is the third one.
You could check the MIDI file/lump length and ignore any that are under 100 bytes long.
If more desperate, you could tweak the QUS midi converter to estimate
play time, and if too short, then duplicate multiple copies into the output buffer until some minimum play time criteria is met. That way the system does not get a short midi.
Could put a short engine generated midi (5 or 10 seconds of silence) appended onto short midi lumps, to extend them.
Last edited by wesleyjohnson on 06-17-10 at 21:18
|