Page 1 of 1

Questions regarding audio callback and decoded audio

Posted: 03 Nov 2015 08:50
by bookie
Hi,

- What is the four characters format to use with libvlc_audio_set_format in order to get have the samples as integers? Could "S32L" /"S32B" work?

- Are the samples received in the play callback interleaved, i.e. sample1channel1, sample1channel2, ... or we get them by channels block, i.e. sample1channel1, ..., sampleNchannel1, sample1channel2, ... ?

Thanks!

Re: Questions regarding audio callback and decoded audio

Posted: 03 Nov 2015 08:58
by Rémi Denis-Courmont
1) It depends on the integer type.
2) Always interleaved.

Re: Questions regarding audio callback and decoded audio

Posted: 03 Nov 2015 09:36
by bookie
1. I want to get 4 byte little endian integers. What would be the format to specify?

Thanks!

Re: Questions regarding audio callback and decoded audio

Posted: 03 Nov 2015 09:56
by Rémi Denis-Courmont
That's 's32l', but it will only work on little endian platforms.

Re: Questions regarding audio callback and decoded audio

Posted: 03 Nov 2015 17:55
by bookie
is the sample count parameter in play callback the total number of samples for all channels, or should this be multiplied by number of channels to get the total?