Skip to content

Adding a few technical improvements to MIDI playback #101

Open
@SDLBugzilla

Description

@SDLBugzilla

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: unspecified
Reported for operating system, platform: Windows 7, x86

Comments on the original bug report:

On 2011-08-06 22:27:05 +0000, Mason Wheeler wrote:

Created attachment 668
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.

On 2011-12-31 11:17:19 +0000, Sam Lantinga wrote:

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?

On 2019-07-31 02:07:18 +0000, sam zain wrote:

great post.
http://www.winmilliongame.com
http://www.gtagame100.com
http://www.subway-game.com
http://www.zumagame100.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions