User Guide
Quick Reference
Modding
Development
User Guide
Quick Reference
Modding
Development
Portable software MIDI output with SF2 soundfonts using the open source FluidSynth.
The FluidSynth audio plugin implements a Doomsday Music interface that synthesizes MIDI music into a raw PCM samples using libfluidsynth. However, because the PCM data's length is not known beforehand, it needs to be played in streaming mode.
To verify that the plugin is in use, look for the “Audio configuration” printed in doomsday.out. It should contain a mention of FluidSynth being used as a Music interface. The command-line option
forces the engine to use FluidSynth for music playback.
You must set the cvar music-soundfont to the full path of an SF2 soundfont file. The first time you set the cvar, it takes until the start of the next song for the SF2 to be taken into use, i.e., it won't happen immediately.
If a MUS/MIDI song is already playing with an SF2 soundfont, changing the value of music-soundfont will immediately have an effect and the MIDI music continues to play using the new soundfont.
If a MUS/MIDI song is playing with an SF2 soundfont and you clear music-soundfont or change it to a .DLS file, the current music will stop and when the next song starts, it will play through another music interface (if available; e.g., FMOD with .DLS).
The FluidSynth plugin supports Mac OS X and Linux, but not Windows (needs GLib 2 library).
A streaming sample is similar to standard samples (sfxsample_t
) with the exception that instead of having a direct pointer to the sample data, it has a callback function through which the sample data is returned on demand. The existing audio drivers need to be modified to support streaming samples.
For distribution packaging, GLib and its dependencies must be included as shared libraries/dependencies.
The plugin can be compiled in one of two ways:
CONFIG
option deng_fluidsynth
determines whether audio_fluidsynth is built is not enabled by default.
deng_embedfluidsynth
build option not enabled by default<references/>