From 3c84dcc81629a19837ec7f530094e69965eefd4d Mon Sep 17 00:00:00 2001 From: derselbst Date: Tue, 22 Dec 2020 11:09:08 +0100 Subject: [PATCH] Update API docs about UTF8 filenames --- doc/recent_changes.txt | 1 + src/synth/fluid_synth.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/doc/recent_changes.txt b/doc/recent_changes.txt index ba86d0a2..503857d5 100644 --- a/doc/recent_changes.txt +++ b/doc/recent_changes.txt @@ -12,6 +12,7 @@ - The sequencer's scale can now be used for arbitrary tempo changes. Previously, the scale of the sequencer was limited to 1000. The only limitation now is >0. - The dynamic-sample-loader has learned support to pin samples, see fluid_synth_pin_preset() and fluid_synth_unpin_preset() - Added getter and setter functions for individual effect groups +- Support for UTF-8 filenames under Windows, see fluid_synth_sfload() \section NewIn2_1_4 What's new in 2.1.4? diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c index f0c13f93..78afb19f 100644 --- a/src/synth/fluid_synth.c +++ b/src/synth/fluid_synth.c @@ -5084,6 +5084,10 @@ fluid_synth_add_sfloader(fluid_synth_t *synth, fluid_sfloader_t *loader) * @param filename File to load * @param reset_presets TRUE to re-assign presets for all MIDI channels (equivalent to calling fluid_synth_program_reset()) * @return SoundFont ID on success, #FLUID_FAILED on error + * + * @note Since FluidSynth 2.2.0 @c filename is treated as an UTF8 encoded string on Windows. FluidSynth will convert it + * to wide-char internally and then pass it to _wfopen(). Before FluidSynth 2.2.0, @c filename was treated as ANSI string + * on Windows. All other platforms directly pass it to fopen() without any conversion (usually, UTF8 is accepted). */ int fluid_synth_sfload(fluid_synth_t *synth, const char *filename, int reset_presets)