#include <fluidsynth.h>
+#if (FLUIDSYNTH_VERSION_MAJOR < 1) \
+ || (FLUIDSYNTH_VERSION_MAJOR == 1 && FLUIDSYNTH_VERSION_MINOR < 1)
+# define FLUID_FAILED (-1)
+# define fluid_synth_sysex(synth, ptr, len, d, e, f, g) (FLUID_FAILED)
+# define fluid_synth_system_reset(synth) (FLUID_FAILED)
+# define fluid_synth_channel_pressure(synth, channel, p) (FLUID_FAILED)
+#endif
+
#define SOUNDFONT_TEXT N_("Sound fonts (required)")
#define SOUNDFONT_LONGTEXT N_( \
"A sound fonts file is required for software synthesis." )
set_category (CAT_INPUT)
set_subcategory (SUBCAT_INPUT_ACODEC)
set_callbacks (Open, Close)
- add_file ("soundfont", "", NULL,
- SOUNDFONT_TEXT, SOUNDFONT_LONGTEXT, false);
+ add_loadfile ("soundfont", "",
+ SOUNDFONT_TEXT, SOUNDFONT_LONGTEXT, false);
vlc_module_end ()
dialog_Fatal (p_this, _("MIDI synthesis not set up"),
_("A sound font file (.SF2) is required for MIDI synthesis.\n"
"Please install a sound font and configure it "
- "from the VLC preferences (Codecs / Audio / FluidSynth).\n"));
+ "from the VLC preferences "
+ "(Input / Codecs > Audio codecs > FluidSynth).\n"));
return VLC_EGENERIC;
}
unsigned samples =
(p_block->i_pts - date_Get (&p_sys->end_date)) * 441 / 10000;
if (samples == 0)
- return NULL;
+ goto drop;
p_out = decoder_NewAudioBuffer (p_dec, samples);
if (p_out == NULL)