Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert fluidsynth CLI arguments #1421

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

pedrolcl
Copy link
Contributor

@pedrolcl pedrolcl commented Nov 5, 2024

Closes #1388

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

sonarqubecloud bot commented Nov 6, 2024

@pedrolcl pedrolcl marked this pull request as ready for review November 6, 2024 06:44
Copy link
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
45 of 54 checks passed
@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
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
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
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?

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