Skip to content

Unable to load Soundfonts with MinGW 8.1 #1755

@derselbst

Description

@derselbst

FluidSynth version

<=2.5.2

Describe the bug

When compiling fluidsynth with MinGW 8.1, fluidsynth will be unable to load SoundFonts. (Possibly also MIDIs and DLS). That's because when fluidsynth seeks in a file using SEEK_CUR, _fseeki64 is used, which in turn calls _ftelli64 to seek from the current offset. However, _ftelli64 reports incorrect values in this toolchain, see: https://sourceforge.net/p/mingw-w64/bugs/864/

This causes fluidsynth to seek to the wrong offset, read wrong data, and ultimately fail.

Expected behavior

SEEK_CUR uses the correct file offset, as reported by ftell() or fgetpos().

Steps to reproduce

See unit test and MinGW8.1 CI build in linked PR.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions