[Libav-user] How to get raw audio frames from an audio file
mregnauld at gmail.com
Sun Oct 21 13:37:02 EEST 2018
Thanks a lot for your help.
That said, I still haven't managed to solve my problem, and I'm new to
My final goal is to be able to extract raw audio frames from an OGG file on
the fly (and, if possible, from any other format), and convert them in an
array of float amplitudes (between -1 and 1).
Here is a copy of the code that I'm trying to make work:
I initiate my player this way:
FFMpegPlayer* ffMpegPlayer = new FFMpegPlayer();
And later on, when I need audio samples, I do this way, and I redirect the
buffer directly to the audio output (it for an Android app):
I still have white noice so far, but I can hear a little bit the music
(actually I guess it more that I can hear it), which makes me think that
I'm close to the solution.
What should I change in my code to get the proper float amplitudes?
Thanks for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user