[Libav-user] Converting audio sample buffer format

Brad O'Hearne brado at bighillsoftware.com
Tue Feb 26 17:43:17 CET 2013


On Feb 26, 2013, at 4:39 AM, René J.V. Bertin <rjvbertin at gmail.com> wrote:

> On Feb 26, 2013, at 02:54, Brad O'Hearne wrote:
>> 
>> - Linear PCM, 24 bit little-endian signed integer, 2 channels, 44100 Hz
> 
> You realise that your earlier message mentioned 32 bit float capture data?

Rene - thank you for your attention to detail. You are correct -- the sample format I mentioned above was a sleep-deprived copy/paste mistake. The proper sample format was as I originally stated: 

- Linear PCM, 32 bit little-endian floating point, 2 channels, 44100 Hz

Thanks again for the good catch! So back to the issue at hand -- I've done a fair amount of reading on audio formats and structure, but I'm still not completely clear on the layout of these buffers depending on #of bits, channels, whether they are interleaved, and sample rate, alignment, and endianness (though with the other info this may be clear). I'm sure there are a few simple principles at work -- but if there's someone that has a good grasp of how these layouts work, I'll give it the college try to convert the sample format myself. 

Having said that, if anyone has any idea or suggestions for how to fix the original issue (which I've traced as far as the swri_realloc_audio call inside of swr_convert).

Thanks everyone's help and discussion thus far -- it is greatly appreciated. 

Cheers, 

Brad




More information about the Libav-user mailing list