[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [fluid-dev] About Supporting 2GiB+ Soundfonts on Windows
From: |
Tom M. |
Subject: |
Re: [fluid-dev] About Supporting 2GiB+ Soundfonts on Windows |
Date: |
Tue, 17 Mar 2020 15:15:03 +0100 |
There is no guarantee that sf->sffd is a FILE* . Again, this is exposed via
our API. sf->sffd is a void*, which could be some user defined handle, which,
when passing to fseek(), would result in an access violation and in a
horrible, possibly-hard-to-reproduce crash of the entire application.
I do not quite understand why you think that fseek() should fail. It only
commands to seek to the end of the file. How this is accomplished is up to the
CRT. Even if _fseeki64/_ftelli64 are not available (as it seems to be the case
on Windows XP), the implemenation could just use _lseeki64/_ltelli64 under the
hood [1].
And yes, due to the RIFF chunks SF2 is limited to 4GiB in total.
[1] https://de.osdn.net/projects/mingw/lists/archive/users/2018-April/
000035.html
Tom