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 - Native midi music disabled if timidity available
Summary: Native midi music disabled if timidity available
Status: RESOLVED FIXED
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: 1.2.8
Hardware: All Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-27 04:52 UTC by Patrice Mandin
Modified: 2009-10-03 02:30 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!