I am working with superpowered sdk for audio processing that excepts a file from assets using the following code.
AssetFileDescriptor fd0 = getResources().openRawResourceFd(R.raw.recorded_audio);
int fileAoffset = (int) fd0.getStartOffset(), fileAlength = (int) fd0.getLength();
The Above values passed to a function, as
SuperpoweredExample(Integer.parseInt(samplerateString), Integer.parseInt(buffersizeString), getPackageResourcePath(), fileAoffset, fileAlength);
This works fine and if i place my audio file in raw folder that works best, but my audio file generated at run time and read that we can't write files in assets. Is there any way i can use file from external memory location?
Try this code,it is using MediaPlayer class.
or this one short and simple from external storage along with path.
hope it works for you.