| Summary: | Adding a few technical improvements to MIDI playback | ||
|---|---|---|---|
| Product: | SDL_mixer | Reporter: | Mason Wheeler <masonwheeler> |
| Component: | misc | Assignee: | Ryan C. Gordon <icculus> |
| Status: | WAITING --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | omarandemad |
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Windows 7 | ||
| Attachments: | Patch for enhanced MIDI playback functionality. | ||
Nice! I don't want to have a difference in functionality between win32 and the other platforms though. Is this something you can add for the other MIDI backends as well as timidity? |
Created attachment 668 [details] Patch for enhanced MIDI playback functionality. This patch introduces two changes to native_midi_win32.c, and the logic is simple enough that it could probably be applied to other MIDI playback systems without too much trouble. 1. The stream-reading logic will watch for silence at the beginning of a track and cull it. Some MIDIs, for whatever reason, begin with 2 seconds or more of silence, which can make working with them awkward. 2. The stream reader will watch for control event #111, the loop marker, and set a new field on the song structure if it finds it. The playback logic is altered so that it will no longer stop playing at the end of a song if the loop marker variable is set, but will instead loop to that position.