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

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

Closed
ghost opened this issue Sep 27, 2024 · 4 comments · Fixed by #1390 or #1421
Closed

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

ghost opened this issue Sep 27, 2024 · 4 comments · Fixed by #1390 or #1421
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Sep 27, 2024

FluidSynth version

fluidsynth.exe --version
FluidSynth runtime version 2.3.6
Copyright (C) 2000-2024 Peter Hanappe and others.
Distributed under the LGPL license.
SoundFont(R) is a registered trademark of Creative Technology Ltd.

FluidSynth executable version 2.3.6
Sample type=float

Describe the bug

On Windows, playback failures due to non-ASCII characters in filenames occur with MIDI files, but not with SoundFont files.
MIDI files that use only ASCII characters in the filename will play correctly.

When _WIN32 macro is enabled.
fluid_is_midifile() is called twice in main() of fluidsynth.c.
The first time, u8_path is set as the argument, which is argv[i] converted by win32_ansi_to_utf8().
The second time, argv[i] is set as the argument without being converted.
This difference is a bit concerning.

Thank you.

@ghost ghost added the bug label Sep 27, 2024
@derselbst derselbst added this to the 2.3 milestone Oct 2, 2024
@derselbst
Copy link
Member

@stardusteyes Thanks for the report. Can you test the fluidsynth-x64 binaries and confirm that this fixes the problem?

@ghost
Copy link
Author

ghost commented Oct 2, 2024

I'm a little concerned that the following is not included, but I don't mind if it doesn't cause any problems.

#if defined(_WIN32)
free(u8_buf);
#endif


I only tested the current issue.
The test binary worked as expected.
I think the problem is fixed.

Thank you.

@derselbst
Copy link
Member

Ok, thanks for confirming. I indeed missed the free(), thanks!

@pedrolcl
Copy link
Contributor

pedrolcl commented Nov 3, 2024

@derselbst , reopen request:

$ ./fluidsynth.exe -F test.wav ~/fluidsynth-git/test/ⓉⒺⓈⓉ.mid
fluidsynth: debug: adding audio.dsound.device=Controlador primario de sonido
fluidsynth: debug: adding audio.dsound.device=GroßeStraßenlautsprecher (HDMI) (2- High Definition Au
dio Device)
fluidsynth: debug: Testing audio device: GroßeStraßenlautsprecher (HDMI)
FluidSynth runtime version 2.4.0
Copyright (C) 2000-2024 Peter Hanappe and others.
Distributed under the LGPL license.
SoundFont(R) is a registered trademark of Creative Technology Ltd.

fluidsynth: error: fluid_is_soundfont(): fopen() failed: 'File does not exist.'
Parameter 'C:/msys64/home/pedro/fluidsynth-git/test/????.mid' not a SoundFont or MIDI file or error
occurred identifying it.
No midi file specified!

$ ls -la ~/fluidsynth-git/test/ⓉⒺⓈⓉ.mid
-rw-r--r-- 1 pedro Ninguno 175 Nov  2 13:31 /home/pedro/fluidsynth-git/test/ⓉⒺⓈⓉ.mid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants