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 509

Summary: Native midi music disabled if timidity available
Product: SDL_mixer Reporter: Patrice Mandin <patmandin>
Component: miscAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: sezeroz
Version: 1.2.8   
Hardware: All   
OS: Linux   

Description Patrice Mandin 2007-10-27 04:52:36 UTC
Hello,

in music.c, line 461:
native_midi_ok = !timidity_ok;

It means that you can't use native midi if timidity is ok and available, even if you set the SDL_NATIVE_MUSIC environment variable (as written in native_midi_gpl/README). It would be nice to be able to test either output without  having to recompile with one or the other disabled.
Comment 1 Patrice Mandin 2007-10-27 05:12:28 UTC
Simple patch:

-- music.c     (revision 3451)
+++ music.c     (working copy)
@@ -459,6 +459,9 @@
 #ifdef USE_NATIVE_MIDI
 #ifdef USE_TIMIDITY_MIDI
        native_midi_ok = !timidity_ok;
+       if (!native_midi_ok) {
+               native_midi_ok = (getenv("SDL_NATIVE_MUSIC") != NULL);
+       }
        if ( native_midi_ok )
 #endif
                native_midi_ok = native_midi_detect();
Comment 2 Sam Lantinga 2009-10-03 02:30:03 UTC
Fixed, thanks!