[LAD] mixing while using libao and libsndfile

Andrea Del Signore sejerpz at gmail.com
Tue May 17 05:42:35 UTC 2016

On Mon, 16 May 2016 17:50:24 -0700, David Griffith wrote:

> On May 16, 2016 3:25:48 PM PDT, David Griffith
> <dave at 661.org> wrote:
>>  Earlier you set up filebuffer like this:
>>buflen = BUFFSIZE * sf_info[0].channels;
>>filebuffer = malloc(buflen * sizeof(float));
>>The size of filebuffer is BUFFSIZE float-sized frames.  Therefore when
>>you specify BUFFSIZE as the number of floats to read, they all fit in
> Sorry.  I meant BUFFSIZE as the number of /frames/.

Yes, but if I understand correctly when using sf_read_* functions, 
sndfile expect the number of items as the third parameters and NOT the 
number of frames.

As per FAQ a frame is 1 item per channel, so I expect BUFFSIZE * channels 
to be the correct value to pass, but it doesn't work!?


More information about the Linux-audio-dev mailing list