Skip to content

Convert fluidsynth CLI arguments#1421

Merged
derselbst merged 2 commits intoFluidSynth:masterfrom
pedrolcl:windows_unicode_commandline
Nov 6, 2024
Merged

Convert fluidsynth CLI arguments#1421
derselbst merged 2 commits intoFluidSynth:masterfrom
pedrolcl:windows_unicode_commandline

Conversation

@pedrolcl
Copy link
Copy Markdown
Contributor

@pedrolcl pedrolcl commented Nov 5, 2024

Closes #1388

@pedrolcl pedrolcl marked this pull request as draft November 5, 2024 22:18
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Nov 6, 2024

@pedrolcl pedrolcl marked this pull request as ready for review November 6, 2024 06:44
Copy link
Copy Markdown
Member

@derselbst derselbst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that solution, thanks!

@derselbst derselbst merged commit 91beec4 into FluidSynth:master Nov 6, 2024
@pedrolcl pedrolcl deleted the windows_unicode_commandline branch November 6, 2024 17:23
for (i = 0; i < argc; ++i)
{
int u8_count = 0;
if (1 > (u8_count = WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, wargv[i], -1, NULL, 0, NULL, NULL)))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pedrolcl We have a minor oversight: WC_ERR_INVALID_CHARS is not available for WindowsXP, causing the CI to fail:
https://dev.azure.com/tommbrt/tommbrt/_build/results?buildId=10875&view=logs&j=ae601b3d-8756-52a4-4bcc-59c4d24c3f8c&t=1e42d489-b2c6-5e77-903e-6d797975357c&l=653

JJC needs WindowsXP compatibility. I haven't seen this earlier, because the build failed due to an issue in libinstpatch related to your bump of libsndfile min version: swami/libinstpatch#78

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then, the only option is to replace the WC_ERR_INVALID_CHARS flag by 0.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would something like

#ifndef WC_ERR_INVALID_CHARS
#define WC_ERR_INVALID_CHARS 0
#endif

make sense, so that at least on modern Windows it reports a proper error?

dangowrt added a commit to dangowrt/packages that referenced this pull request Apr 26, 2025
fluidsynth 2.4.5

    Prebuilt Windows Binaries were missing SDL3.dll
    (FluidSynth/fluidsynth#1510)

    Fix SDL3 intercepting signals, causing CTRL+C to not quit fluidsynth
    (FluidSynth/fluidsynth#1509)

    Fix a few flaws in the AWE32 NRPN implementation
    (FluidSynth/fluidsynth#1452, FluidSynth/fluidsynth#1473)

    A regression introduced in 2.4.4 broke drum preset selection for XG
    MIDIs (FluidSynth/fluidsynth#1508)

    Fix for OpenMP thread affinity crashes on Android devices
    (FluidSynth/fluidsynth#1521, thanks to @looechao)

    Fix fluidsynth's systemd user daemon being unable to create lock
    file on some distros (FluidSynth/fluidsynth#1527, thanks to
    @andrew-sayers)

    Fix fluidsynth ignoring initialFilterFc generator limits
    (FluidSynth/fluidsynth#1502)

    A regression introduced in 2.3.6 prevented SF2 NRPN messages from
    being processed correctly (FluidSynth/fluidsynth#1536)

fluidsynth 2.4.4

    Support for SDL3 has been added, support for SDL2 has been
    deprecated (FluidSynth/fluidsynth#1485, FluidSynth/fluidsynth#1478,
    thanks to @andyvand)

    Soundfonts that are not respecting the 46 zero-sample padding-space
    previously sounded incorrect when

    synth.dynamic-sample-loading was active (FluidSynth/fluidsynth#1484)

    Allow drum channels to profit from Soundfont Bank Offsets by no
    longer ignoring MSB Bank changes (FluidSynth/fluidsynth#1475)

    Revise the preset fallback logic for drum channels
    (FluidSynth/fluidsynth#1486)

    A regression introduced in 2.4.1 may have caused interrupted
    real-time playback when voices were using the lowpass filter
    (FluidSynth/fluidsynth#1481)

    Improve multi-user experience when running fluidsynth as systemd
    service (FluidSynth/fluidsynth#1491, thanks to @andrew-sayers)

    Fix ordering and dependencies of fluidsynth's systemd service
    (FluidSynth/fluidsynth#1500, thanks to @fabiangreffrath)

    Revise fluidsynth's man page (FluidSynth/fluidsynth#1499, thanks to
    @fabiangreffrath)

fluidsynth 2.4.3

    It was discovered, that exclusive class note terminations were too
    slow (FluidSynth/fluidsynth#1467, thanks to @mrbumpy409)

    Fix a regression introduced in 2.4.0 that allowed the amplitude of a
    voice playing in delay phase to rise infinitely
    (FluidSynth/fluidsynth#1451)

    MSGS drum-style note-cut has been converted to an opt-in setting
    synth.note-cut (FluidSynth/fluidsynth#1466)

    Support for SDL2 has been disabled by default*
    (FluidSynth/fluidsynth#1472)

    Fix a regression introduced in 2.4.1 that could have caused infinite
    audio gain output for some MIDI files under certain configurations
    (FluidSynth/fluidsynth#1464)

    Silence a warning issued by Systemd v254+
    (FluidSynth/fluidsynth#1474, thanks to @andrew-sayers)

fluidsynth 2.4.2

    Fix audible clicks when turning off voices while using a high filter
    resonance (FluidSynth/fluidsynth#1427)

    Fix a build failure with MSYS2 and MinGW when processing
    VersionResource.rc (FluidSynth/fluidsynth#1448, thanks to @pedrolcl)

    Fix a crash on startup when there are no MIDI devices available on
    Windows (FluidSynth/fluidsynth#1446, thanks to @pedrolcl)

    Restore discovery of libsndfile (FluidSynth/fluidsynth#1445)

    Fix a race condition when loading SF3 files containing multiple
    uncompressed samples (FluidSynth/fluidsynth#1457)

fluidsynth 2.4.1

    Enable libsndfile to use filename with non-ASCII characters on
    Windows (FluidSynth/fluidsynth#1416, thanks to @pedrolcl and
    @stardusteyes)

    Fix a few commandline encoding related issues on Windows
    (FluidSynth/fluidsynth#1388, FluidSynth/fluidsynth#1421, thanks to
    @pedrolcl)

    Fix build errors on Windows (FluidSynth/fluidsynth#1419,
    FluidSynth/fluidsynth#1422, thanks to @carlo-bramini)

    Fix clicks and pops caused when changing parameters of the lowpass
    filter (FluidSynth/fluidsynth#1415, FluidSynth/fluidsynth#1417,
    FluidSynth/fluidsynth#1424)

    Minor adjustment to AWE32 NRPN behavior (FluidSynth/fluidsynth#1430)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
dangowrt added a commit to openwrt/packages that referenced this pull request Apr 26, 2025
fluidsynth 2.4.5

    Prebuilt Windows Binaries were missing SDL3.dll
    (FluidSynth/fluidsynth#1510)

    Fix SDL3 intercepting signals, causing CTRL+C to not quit fluidsynth
    (FluidSynth/fluidsynth#1509)

    Fix a few flaws in the AWE32 NRPN implementation
    (FluidSynth/fluidsynth#1452, FluidSynth/fluidsynth#1473)

    A regression introduced in 2.4.4 broke drum preset selection for XG
    MIDIs (FluidSynth/fluidsynth#1508)

    Fix for OpenMP thread affinity crashes on Android devices
    (FluidSynth/fluidsynth#1521, thanks to @looechao)

    Fix fluidsynth's systemd user daemon being unable to create lock
    file on some distros (FluidSynth/fluidsynth#1527, thanks to
    @andrew-sayers)

    Fix fluidsynth ignoring initialFilterFc generator limits
    (FluidSynth/fluidsynth#1502)

    A regression introduced in 2.3.6 prevented SF2 NRPN messages from
    being processed correctly (FluidSynth/fluidsynth#1536)

fluidsynth 2.4.4

    Support for SDL3 has been added, support for SDL2 has been
    deprecated (FluidSynth/fluidsynth#1485, FluidSynth/fluidsynth#1478,
    thanks to @andyvand)

    Soundfonts that are not respecting the 46 zero-sample padding-space
    previously sounded incorrect when

    synth.dynamic-sample-loading was active (FluidSynth/fluidsynth#1484)

    Allow drum channels to profit from Soundfont Bank Offsets by no
    longer ignoring MSB Bank changes (FluidSynth/fluidsynth#1475)

    Revise the preset fallback logic for drum channels
    (FluidSynth/fluidsynth#1486)

    A regression introduced in 2.4.1 may have caused interrupted
    real-time playback when voices were using the lowpass filter
    (FluidSynth/fluidsynth#1481)

    Improve multi-user experience when running fluidsynth as systemd
    service (FluidSynth/fluidsynth#1491, thanks to @andrew-sayers)

    Fix ordering and dependencies of fluidsynth's systemd service
    (FluidSynth/fluidsynth#1500, thanks to @fabiangreffrath)

    Revise fluidsynth's man page (FluidSynth/fluidsynth#1499, thanks to
    @fabiangreffrath)

fluidsynth 2.4.3

    It was discovered, that exclusive class note terminations were too
    slow (FluidSynth/fluidsynth#1467, thanks to @mrbumpy409)

    Fix a regression introduced in 2.4.0 that allowed the amplitude of a
    voice playing in delay phase to rise infinitely
    (FluidSynth/fluidsynth#1451)

    MSGS drum-style note-cut has been converted to an opt-in setting
    synth.note-cut (FluidSynth/fluidsynth#1466)

    Support for SDL2 has been disabled by default*
    (FluidSynth/fluidsynth#1472)

    Fix a regression introduced in 2.4.1 that could have caused infinite
    audio gain output for some MIDI files under certain configurations
    (FluidSynth/fluidsynth#1464)

    Silence a warning issued by Systemd v254+
    (FluidSynth/fluidsynth#1474, thanks to @andrew-sayers)

fluidsynth 2.4.2

    Fix audible clicks when turning off voices while using a high filter
    resonance (FluidSynth/fluidsynth#1427)

    Fix a build failure with MSYS2 and MinGW when processing
    VersionResource.rc (FluidSynth/fluidsynth#1448, thanks to @pedrolcl)

    Fix a crash on startup when there are no MIDI devices available on
    Windows (FluidSynth/fluidsynth#1446, thanks to @pedrolcl)

    Restore discovery of libsndfile (FluidSynth/fluidsynth#1445)

    Fix a race condition when loading SF3 files containing multiple
    uncompressed samples (FluidSynth/fluidsynth#1457)

fluidsynth 2.4.1

    Enable libsndfile to use filename with non-ASCII characters on
    Windows (FluidSynth/fluidsynth#1416, thanks to @pedrolcl and
    @stardusteyes)

    Fix a few commandline encoding related issues on Windows
    (FluidSynth/fluidsynth#1388, FluidSynth/fluidsynth#1421, thanks to
    @pedrolcl)

    Fix build errors on Windows (FluidSynth/fluidsynth#1419,
    FluidSynth/fluidsynth#1422, thanks to @carlo-bramini)

    Fix clicks and pops caused when changing parameters of the lowpass
    filter (FluidSynth/fluidsynth#1415, FluidSynth/fluidsynth#1417,
    FluidSynth/fluidsynth#1424)

    Minor adjustment to AWE32 NRPN behavior (FluidSynth/fluidsynth#1430)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
BKPepe pushed a commit to openwrt/packages that referenced this pull request Sep 13, 2025
fluidsynth 2.4.5

    Prebuilt Windows Binaries were missing SDL3.dll
    (FluidSynth/fluidsynth#1510)

    Fix SDL3 intercepting signals, causing CTRL+C to not quit fluidsynth
    (FluidSynth/fluidsynth#1509)

    Fix a few flaws in the AWE32 NRPN implementation
    (FluidSynth/fluidsynth#1452, FluidSynth/fluidsynth#1473)

    A regression introduced in 2.4.4 broke drum preset selection for XG
    MIDIs (FluidSynth/fluidsynth#1508)

    Fix for OpenMP thread affinity crashes on Android devices
    (FluidSynth/fluidsynth#1521, thanks to @looechao)

    Fix fluidsynth's systemd user daemon being unable to create lock
    file on some distros (FluidSynth/fluidsynth#1527, thanks to
    @andrew-sayers)

    Fix fluidsynth ignoring initialFilterFc generator limits
    (FluidSynth/fluidsynth#1502)

    A regression introduced in 2.3.6 prevented SF2 NRPN messages from
    being processed correctly (FluidSynth/fluidsynth#1536)

fluidsynth 2.4.4

    Support for SDL3 has been added, support for SDL2 has been
    deprecated (FluidSynth/fluidsynth#1485, FluidSynth/fluidsynth#1478,
    thanks to @andyvand)

    Soundfonts that are not respecting the 46 zero-sample padding-space
    previously sounded incorrect when

    synth.dynamic-sample-loading was active (FluidSynth/fluidsynth#1484)

    Allow drum channels to profit from Soundfont Bank Offsets by no
    longer ignoring MSB Bank changes (FluidSynth/fluidsynth#1475)

    Revise the preset fallback logic for drum channels
    (FluidSynth/fluidsynth#1486)

    A regression introduced in 2.4.1 may have caused interrupted
    real-time playback when voices were using the lowpass filter
    (FluidSynth/fluidsynth#1481)

    Improve multi-user experience when running fluidsynth as systemd
    service (FluidSynth/fluidsynth#1491, thanks to @andrew-sayers)

    Fix ordering and dependencies of fluidsynth's systemd service
    (FluidSynth/fluidsynth#1500, thanks to @fabiangreffrath)

    Revise fluidsynth's man page (FluidSynth/fluidsynth#1499, thanks to
    @fabiangreffrath)

fluidsynth 2.4.3

    It was discovered, that exclusive class note terminations were too
    slow (FluidSynth/fluidsynth#1467, thanks to @mrbumpy409)

    Fix a regression introduced in 2.4.0 that allowed the amplitude of a
    voice playing in delay phase to rise infinitely
    (FluidSynth/fluidsynth#1451)

    MSGS drum-style note-cut has been converted to an opt-in setting
    synth.note-cut (FluidSynth/fluidsynth#1466)

    Support for SDL2 has been disabled by default*
    (FluidSynth/fluidsynth#1472)

    Fix a regression introduced in 2.4.1 that could have caused infinite
    audio gain output for some MIDI files under certain configurations
    (FluidSynth/fluidsynth#1464)

    Silence a warning issued by Systemd v254+
    (FluidSynth/fluidsynth#1474, thanks to @andrew-sayers)

fluidsynth 2.4.2

    Fix audible clicks when turning off voices while using a high filter
    resonance (FluidSynth/fluidsynth#1427)

    Fix a build failure with MSYS2 and MinGW when processing
    VersionResource.rc (FluidSynth/fluidsynth#1448, thanks to @pedrolcl)

    Fix a crash on startup when there are no MIDI devices available on
    Windows (FluidSynth/fluidsynth#1446, thanks to @pedrolcl)

    Restore discovery of libsndfile (FluidSynth/fluidsynth#1445)

    Fix a race condition when loading SF3 files containing multiple
    uncompressed samples (FluidSynth/fluidsynth#1457)

fluidsynth 2.4.1

    Enable libsndfile to use filename with non-ASCII characters on
    Windows (FluidSynth/fluidsynth#1416, thanks to @pedrolcl and
    @stardusteyes)

    Fix a few commandline encoding related issues on Windows
    (FluidSynth/fluidsynth#1388, FluidSynth/fluidsynth#1421, thanks to
    @pedrolcl)

    Fix build errors on Windows (FluidSynth/fluidsynth#1419,
    FluidSynth/fluidsynth#1422, thanks to @carlo-bramini)

    Fix clicks and pops caused when changing parameters of the lowpass
    filter (FluidSynth/fluidsynth#1415, FluidSynth/fluidsynth#1417,
    FluidSynth/fluidsynth#1424)

    Minor adjustment to AWE32 NRPN behavior (FluidSynth/fluidsynth#1430)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit dd8780e)
liudf0716 pushed a commit to liudf0716/packages that referenced this pull request Oct 23, 2025
fluidsynth 2.4.5

    Prebuilt Windows Binaries were missing SDL3.dll
    (FluidSynth/fluidsynth#1510)

    Fix SDL3 intercepting signals, causing CTRL+C to not quit fluidsynth
    (FluidSynth/fluidsynth#1509)

    Fix a few flaws in the AWE32 NRPN implementation
    (FluidSynth/fluidsynth#1452, FluidSynth/fluidsynth#1473)

    A regression introduced in 2.4.4 broke drum preset selection for XG
    MIDIs (FluidSynth/fluidsynth#1508)

    Fix for OpenMP thread affinity crashes on Android devices
    (FluidSynth/fluidsynth#1521, thanks to @looechao)

    Fix fluidsynth's systemd user daemon being unable to create lock
    file on some distros (FluidSynth/fluidsynth#1527, thanks to
    @andrew-sayers)

    Fix fluidsynth ignoring initialFilterFc generator limits
    (FluidSynth/fluidsynth#1502)

    A regression introduced in 2.3.6 prevented SF2 NRPN messages from
    being processed correctly (FluidSynth/fluidsynth#1536)

fluidsynth 2.4.4

    Support for SDL3 has been added, support for SDL2 has been
    deprecated (FluidSynth/fluidsynth#1485, FluidSynth/fluidsynth#1478,
    thanks to @andyvand)

    Soundfonts that are not respecting the 46 zero-sample padding-space
    previously sounded incorrect when

    synth.dynamic-sample-loading was active (FluidSynth/fluidsynth#1484)

    Allow drum channels to profit from Soundfont Bank Offsets by no
    longer ignoring MSB Bank changes (FluidSynth/fluidsynth#1475)

    Revise the preset fallback logic for drum channels
    (FluidSynth/fluidsynth#1486)

    A regression introduced in 2.4.1 may have caused interrupted
    real-time playback when voices were using the lowpass filter
    (FluidSynth/fluidsynth#1481)

    Improve multi-user experience when running fluidsynth as systemd
    service (FluidSynth/fluidsynth#1491, thanks to @andrew-sayers)

    Fix ordering and dependencies of fluidsynth's systemd service
    (FluidSynth/fluidsynth#1500, thanks to @fabiangreffrath)

    Revise fluidsynth's man page (FluidSynth/fluidsynth#1499, thanks to
    @fabiangreffrath)

fluidsynth 2.4.3

    It was discovered, that exclusive class note terminations were too
    slow (FluidSynth/fluidsynth#1467, thanks to @mrbumpy409)

    Fix a regression introduced in 2.4.0 that allowed the amplitude of a
    voice playing in delay phase to rise infinitely
    (FluidSynth/fluidsynth#1451)

    MSGS drum-style note-cut has been converted to an opt-in setting
    synth.note-cut (FluidSynth/fluidsynth#1466)

    Support for SDL2 has been disabled by default*
    (FluidSynth/fluidsynth#1472)

    Fix a regression introduced in 2.4.1 that could have caused infinite
    audio gain output for some MIDI files under certain configurations
    (FluidSynth/fluidsynth#1464)

    Silence a warning issued by Systemd v254+
    (FluidSynth/fluidsynth#1474, thanks to @andrew-sayers)

fluidsynth 2.4.2

    Fix audible clicks when turning off voices while using a high filter
    resonance (FluidSynth/fluidsynth#1427)

    Fix a build failure with MSYS2 and MinGW when processing
    VersionResource.rc (FluidSynth/fluidsynth#1448, thanks to @pedrolcl)

    Fix a crash on startup when there are no MIDI devices available on
    Windows (FluidSynth/fluidsynth#1446, thanks to @pedrolcl)

    Restore discovery of libsndfile (FluidSynth/fluidsynth#1445)

    Fix a race condition when loading SF3 files containing multiple
    uncompressed samples (FluidSynth/fluidsynth#1457)

fluidsynth 2.4.1

    Enable libsndfile to use filename with non-ASCII characters on
    Windows (FluidSynth/fluidsynth#1416, thanks to @pedrolcl and
    @stardusteyes)

    Fix a few commandline encoding related issues on Windows
    (FluidSynth/fluidsynth#1388, FluidSynth/fluidsynth#1421, thanks to
    @pedrolcl)

    Fix build errors on Windows (FluidSynth/fluidsynth#1419,
    FluidSynth/fluidsynth#1422, thanks to @carlo-bramini)

    Fix clicks and pops caused when changing parameters of the lowpass
    filter (FluidSynth/fluidsynth#1415, FluidSynth/fluidsynth#1417,
    FluidSynth/fluidsynth#1424)

    Minor adjustment to AWE32 NRPN behavior (FluidSynth/fluidsynth#1430)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit dd8780e)
(cherry picked from commit 8587135)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MIDI files with non-ASCII characters in the filename fail to play on Windows.

2 participants