[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [fluid-dev] About Supporting 2GiB+ Soundfonts on Windows
From: |
Carlo Bramini |
Subject: |
Re: [fluid-dev] About Supporting 2GiB+ Soundfonts on Windows |
Date: |
Thu, 19 Mar 2020 17:49:11 +0100 (CET) |
Hello!
> 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.
Yes, I know ;)
As I have written, the function was a test that I made with traditional
fseek/ftell, because I did an experiment for detecting the size of a file
larger than 2 GiB, by using only C89/C90 functions. That example function
surely needs to be improved: since you confirmed that the limit of the size is
4GiB, it is required to count the number of hops and if they are more than 3,
it should return an error, but actually it depends if it is a good idea or not.
Sincerely.
Carlo Bramini.