I would suggest you look into libswresample, particularly swr_convert().
On Wed, Aug 9, 2017 at 4:33 PM, Philippe Gorley <
> I need to read an audio file into an array of samples and then
> deinterleave/resample it. Right now, I'm decoding the file using the
> avcodec_send_packet/avcodec_receive_frame API. But how do I get the
> samples from an AVFrame into an int16_t?
> Philippe Gorley
> Free Software Consultant | Montréal, Qc
> Savoir-faire Linux
> Confidentiality Message: This communication (including any files
> transmitted with it) is intended solely for the person or entity to
> whom it is addressed, and may contain confidential or privileged
> The disclosure, distribution or copying of this message is strictly
> forbidden. Should you have received this communication in error,
> kindly contact the sender promptly, destroy any copies and delete
> this message from your computer system.
> Libav-user mailing list
Libav-user mailing list