AAsset_openFileDescriptor
will only work with files that are not compressed (e.g. mp3, jpg, png, etc.). It is written in the documentation (asset_manager.h header file):
int AAsset_openFileDescriptor(AAsset* asset, off_t* outStart, off_t* outLength);
Use either AAsset_read
or AAsset_getBuffer
.
source share