-
Notifications
You must be signed in to change notification settings - Fork 285
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
Building for Android with ANDROID_PLATFORM < 24 results in fseeko() and ftello() always return error in 32-bit build #494
Comments
A stupid question perhaps, but what would one gain by building libFLAC on Android? libFLAC is already part of the Android system API's. Related to that: perhaps there is a patch somewhere for this in the Android sources? https://android.googlesource.com/platform/external/flac/ |
As far as I can tell, libFLAC can't be used directly by app developers, you have to go through through the Media API, which is cumbersome. I'll look more, but can't see how (if?) they resolved the fseeko thing there |
I added this to compat.h
and it works, but I think that will fail with files larger than 2GB. |
I can't seem to find any changes in Android's version of FLAC related to this. Perhaps it is interesting to try and generate a FLAC file through some existing Android app using the Media API? If such a file also lacks the metadata you reference, perhaps this isn't fixed in the Media API either? Anyway, I can't be of much help here, sadly. |
I've been looking through the libFLAC that shipped with Android 6.0 (which shipped with API level 23) at https://android.googlesource.com/platform/external/flac/+/refs/tags/android-6.0.0_r26/ I can't find anything relating to this. It seems fseeko is used at several places. So, it seems fseeko wasn't made available but is available at a lower level? Can I close this issue? You've found a fix (from the document you linked it seems the only possible fix). |
Fair enough, since devs compiling flac with ANDROID_PLATFORM < 24 and 32-bit Android in general is getting less and less common we shouldn't waste anymore brain power on it. |
- Update Opus and FLAC to the latest versions - Build FLAC with -Wno-error=implicit-function-declaration to avoid compile errors for fseeko() and ftello(). (According to [1] they don't work, but that's fine because we don't really use FLAC.) [1] xiph/flac#494
The 32-bit ABI bugs document suggests they're not available, but I didn't notice it until encoder
finish()
is always false and metadata not written, it seems likefseeko()
is always returning error.I'm not sure how to fix it yet, I can't raise my ANDROID_PLATFORM to 24 yet.
The text was updated successfully, but these errors were encountered: