We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1267 - Adding a few technical improvements to MIDI playback
Summary: Adding a few technical improvements to MIDI playback
Status: WAITING
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86 Windows 7
: P2 enhancement
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-06 22:27 UTC by Mason Wheeler
Modified: 2019-07-31 02:07 UTC (History)
1 user (show)

See Also:


Attachments
Patch for enhanced MIDI playback functionality. (2.87 KB, application/octet-stream)
2011-08-06 22:27 UTC, Mason Wheeler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mason Wheeler 2011-08-06 22:27:05 UTC
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.
Comment 1 Sam Lantinga 2011-12-31 11:17:19 UTC
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?