Reputation: 3630
In my Android app, I would like to be able to process audio on the fly from an OGG file by extracting audio samples, process them and redirect them to the audio output.
I know how to make the last 2 steps using Android NDK, but I don't know how to extract audio samples to get them in an array of floats or shorts.
I tried to make this code work that, apparently, can extract raw audio samples on the fly.
The problem is: I don't manage to add FFMpeg in my project. I tried many tutorials (like this one), but it seems pretty difficult since I work on Windows. So after a while, I found Prebuild FFMpeg for Android, that seems interesting since it's available for armeabi-v7a, arm64-v8a, x86 and x86_64 architectures, but again, I don't understand how to add it in my project.
I also took a look at libogg
, libvorbis
and vorbisfile
, but I have no idea how to add them in my project.
So, does anyone have a working example on how to extract audio samples from an OGG file on the fly?
Thanks for your help.
Upvotes: 1
Views: 490
Reputation: 3630
Here is how I finally managed to proceed:
For the step #2, you'll just have to make minor updates so you can target the following ABIs:
Hope this helps.
Upvotes: 1