Ticket #2275: fluidsynth.diff

File fluidsynth.diff, 955 bytes (added by eriktorbjorn, 19 years ago)

Patch against an October 21 CVS snapshot

  • fluidsynth.cpp

    RCS file: /cvsroot/scummvm/scummvm/sound/softsynth/fluidsynth.cpp,v
    retrieving revision 1.6
    diff -u -r1.6 fluidsynth.cpp
     
    114114
    115115        _settings = new_fluid_settings();
    116116
    117         // The default gain setting is ridiculously low, but we can't set it
    118         // too high either or sound will be clipped. This may need tuning...
     117        // The default gain setting is ridiculously low, at least for the
     118        // SoundFont I tried, but we can't set it too high either or sound will
     119        // be clipped.
    119120
    120         setNum("synth.gain", 2.1);
     121        double midi_gain = 2.1;
     122
     123        if (ConfMan.hasKey("midi_gain")) {
     124                midi_gain = strtod(ConfMan.get("midi_gain").c_str(), NULL);
     125        }
     126
     127        setNum("synth.gain", midi_gain);
    121128        setNum("synth.sample-rate", _outputRate);
    122129
    123130        _synth = new_fluid_synth(_settings);