For benchmarking purposes I repeat loading data from an asset and processing it with the Superpowered SDK. For opening the asset with the Superpowered SDK I create an AssetFileDescripter afd
on java side and make a JNI call with the path to the apk, afd.getStartOffset()
and afd.getLength()
as parameters. In this JNI function I load the asset with a SuperpoweredDecoder and create a new file (/storage/emulated/0/result.wav
) for saving the result.
The Problem is that when I create a new AssetFileDescripter
in each benchmark iteration on java side creating the file /storage/emulated/0/result.wav
with the Superpowered SDK fails after 971 iterations, or most of the time 995 iterations.
If I use only one and the same AssetFileDescripter
for all iterations, all works fine and I can make 1000 or more benchmark iterations.
Does anybody have ideas? (The android version of my testing device is 4.4.2)
I would be thankful for all hints.