RCS file: /cvsroot/scummvm/scummvm/NEWS,v
retrieving revision 1.132
diff -u -r1.132 NEWS
|
|
|
21 | 21 | - Added FluidSynth MIDI driver. |
22 | 22 | - Added GUI for the "soundfont" setting. (Currently only used by the |
23 | 23 | CoreAudio and FluidSynth MIDI drivers.) |
| 24 | - Added "MIDI gain" setting. (Currently only used by the FluidSynth MIDI |
| 25 | driver.) |
24 | 26 | - The MPEG player could hang if the sound ended prematurely. |
25 | 27 | - Improved autoscaling GUI, which takes full advantage of your screen. |
26 | 28 | - Fixes for GCC 4. |
RCS file: /cvsroot/scummvm/scummvm/README,v
retrieving revision 1.339
diff -u -r1.339 README
|
|
|
834 | 834 | ---- ---------------------------------------------- |
835 | 835 | If ScummVM was build with libfluildsynth support it will be able to play MIDI |
836 | 836 | music through the FluidSynth driver. You will have to specify a SoundFont to |
837 | | use, however. |
| 837 | use, however. Depending on the SoundFont, you may also have to adjust the MIDI |
| 838 | gain setting. |
838 | 839 | |
839 | 840 | NOTE: The processor requirements for FluidSynth can be fairly high in some |
840 | 841 | cases. A fast CPU is recommended. |
RCS file: /cvsroot/scummvm/scummvm/base/gameDetector.cpp,v
retrieving revision 1.126
diff -u -r1.126 gameDetector.cpp
|
|
|
132 | 132 | ConfMan.registerDefault("multi_midi", false); |
133 | 133 | ConfMan.registerDefault("native_mt32", false); |
134 | 134 | ConfMan.registerDefault("enable_gs", false); |
| 135 | ConfMan.registerDefault("midi_gain", 150); |
135 | 136 | // ConfMan.registerDefault("music_driver", ???); |
136 | 137 | |
137 | 138 | ConfMan.registerDefault("cdrom", 0); |
RCS file: /cvsroot/scummvm/scummvm/doc/07_02b.tex,v
retrieving revision 1.1
diff -u -r1.1 07_02b.tex
|
|
|
8 | 8 | |
9 | 9 | If ScummVM was build with libfluildsynth support it will be able to play MIDI |
10 | 10 | music through the FluidSynth driver. You will have to specify a SoundFont to |
11 | | use, however. |
| 11 | use, however. Depending on the SoundFont, you may also have to adjust the MIDI |
| 12 | gain setting. |
12 | 13 | |
13 | 14 | \textbf{NOTE:} The processor requirements for FluidSynth can be fairly high in |
14 | 15 | some cases. A fast CPU is recommended. |
RCS file: /cvsroot/scummvm/scummvm/gui/options.cpp,v
retrieving revision 1.99
diff -u -r1.99 options.cpp
|
|
|
60 | 60 | kSfxVolumeChanged = 'sfvc', |
61 | 61 | kSpeechVolumeChanged = 'vcvc', |
62 | 62 | kChooseSoundFontCmd = 'chsf', |
| 63 | kMIDIGainChanged = 'migc', |
63 | 64 | kChooseSaveDirCmd = 'chos', |
64 | 65 | kChooseExtraDirCmd = 'chex' |
65 | 66 | }; |
… |
… |
|
159 | 160 | |
160 | 161 | // GS extensions setting |
161 | 162 | _enableGSCheckbox->setState(ConfMan.getBool("enable_gs", _domain)); |
| 163 | |
| 164 | char buf[10]; |
| 165 | int gain = ConfMan.getInt("midi_gain", _domain); |
| 166 | sprintf(buf, "%.2f", (double)gain / 100.0); |
| 167 | _midiGainSlider->setValue(gain); |
| 168 | _midiGainLabel->setLabel(buf); |
162 | 169 | } |
163 | 170 | |
164 | 171 | |
… |
… |
|
232 | 239 | ConfMan.set("multi_midi", _multiMidiCheckbox->getState(), _domain); |
233 | 240 | ConfMan.set("native_mt32", _mt32Checkbox->getState(), _domain); |
234 | 241 | ConfMan.set("enable_gs", _enableGSCheckbox->getState(), _domain); |
| 242 | ConfMan.set("midi_gain", _midiGainSlider->getValue(), _domain); |
235 | 243 | } else { |
236 | 244 | ConfMan.removeKey("multi_midi", _domain); |
237 | 245 | ConfMan.removeKey("native_mt32", _domain); |
238 | 246 | ConfMan.removeKey("enable_gs", _domain); |
| 247 | ConfMan.removeKey("midi_gain", _domain); |
239 | 248 | } |
240 | 249 | } |
241 | 250 | |
… |
… |
|
247 | 256 | } |
248 | 257 | |
249 | 258 | void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { |
| 259 | char buf[10]; |
| 260 | |
250 | 261 | switch (cmd) { |
251 | 262 | case kMusicVolumeChanged: |
252 | 263 | _musicVolumeLabel->setValue(_musicVolumeSlider->getValue()); |
… |
… |
|
260 | 271 | _speechVolumeLabel->setValue(_speechVolumeSlider->getValue()); |
261 | 272 | _speechVolumeLabel->draw(); |
262 | 273 | break; |
| 274 | case kMIDIGainChanged: |
| 275 | sprintf(buf, "%.2f", (double)_midiGainSlider->getValue() / 100.0); |
| 276 | _midiGainLabel->setLabel(buf); |
| 277 | _midiGainLabel->draw(); |
| 278 | break; |
263 | 279 | case kOKCmd: |
264 | 280 | setResult(1); |
265 | 281 | close(); |
… |
… |
|
295 | 311 | _multiMidiCheckbox->setEnabled(enabled); |
296 | 312 | _mt32Checkbox->setEnabled(enabled); |
297 | 313 | _enableGSCheckbox->setEnabled(enabled); |
| 314 | _midiGainSlider->setEnabled(enabled); |
| 315 | _midiGainLabel->setEnabled(enabled); |
298 | 316 | } |
299 | 317 | |
300 | 318 | void OptionsDialog::setVolumeSettingsState(bool enabled) { |
… |
… |
|
411 | 429 | } |
412 | 430 | |
413 | 431 | // SoundFont |
414 | | _soundFontButton = addButton(boss, x, yoffset, "SoundFont: ", kChooseSoundFontCmd, 0, ws); |
| 432 | _soundFontButton = addButton(boss, x, yoffset, "SoundFont:", kChooseSoundFontCmd, 0, ws); |
415 | 433 | _soundFont = new StaticTextWidget(boss, x + buttonWidth + 20, yoffset + 3, _w - (x + buttonWidth + 20) - 10, kLineHeight, "None", kTextAlignLeft, ws); |
416 | 434 | yoffset += buttonHeight + 2 * spacing; |
417 | 435 | |
… |
… |
|
427 | 445 | _enableGSCheckbox = addCheckbox(boss, x, yoffset, "Enable Roland GS Mode", 0, 0, ws); |
428 | 446 | yoffset += _enableGSCheckbox->getHeight() + spacing; |
429 | 447 | |
| 448 | const char *label = "MIDI gain:"; |
| 449 | int textwidth = g_gui.getStringWidth(label); |
| 450 | |
| 451 | new StaticTextWidget(boss, x, yoffset + 2, textwidth, kLineHeight, label, kTextAlignLeft, ws); |
| 452 | _midiGainSlider = addSlider(boss, x + textwidth + 15, yoffset, kMIDIGainChanged, ws); |
| 453 | _midiGainLabel = new StaticTextWidget(boss, x + textwidth + 15 + _midiGainSlider->getWidth() + 10, yoffset + 2, 40, kLineHeight, "100%", kTextAlignLeft, ws); |
| 454 | |
| 455 | _midiGainSlider->setMinValue(0); |
| 456 | _midiGainSlider->setMaxValue(1000); |
| 457 | _midiGainLabel->setFlags(WIDGET_CLEARBG); |
| 458 | |
| 459 | yoffset += _midiGainSlider->getHeight() + 4; |
| 460 | |
430 | 461 | _enableMIDISettings = true; |
431 | 462 | |
432 | 463 | return yoffset; |
RCS file: /cvsroot/scummvm/scummvm/gui/options.h,v
retrieving revision 1.34
diff -u -r1.34 options.h
|
|
|
104 | 104 | |
105 | 105 | SliderWidget *_speechVolumeSlider; |
106 | 106 | StaticTextWidget *_speechVolumeLabel; |
| 107 | |
| 108 | SliderWidget *_midiGainSlider; |
| 109 | StaticTextWidget *_midiGainLabel; |
107 | 110 | }; |
108 | 111 | |
109 | 112 | |
RCS file: /cvsroot/scummvm/scummvm/sound/softsynth/fluidsynth.cpp,v
retrieving revision 1.7
diff -u -r1.7 fluidsynth.cpp
|
|
|
114 | 114 | |
115 | 115 | _settings = new_fluid_settings(); |
116 | 116 | |
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 | double gain = (double)ConfMan.getInt("midi_gain") / 100.0; |
119 | 118 | |
120 | | setNum("synth.gain", 2.1); |
| 119 | setNum("synth.gain", gain); |
121 | 120 | setNum("synth.sample-rate", _outputRate); |
122 | 121 | |
123 | 122 | _synth = new_fluid_synth(_settings); |