Questions regarding audio callback and decoded audio

This forum is about all development around libVLC.
bookie
Blank Cone
Blank Cone
Posts: 27
Joined: 29 Dec 2011 11:18

Questions regarding audio callback and decoded audio

Postby bookie » 03 Nov 2015 08:50

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!

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Questions regarding audio callback and decoded audio

Postby Rémi Denis-Courmont » 03 Nov 2015 08:58

1) It depends on the integer type.
2) Always interleaved.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

bookie
Blank Cone
Blank Cone
Posts: 27
Joined: 29 Dec 2011 11:18

Re: Questions regarding audio callback and decoded audio

Postby bookie » 03 Nov 2015 09:36

1. I want to get 4 byte little endian integers. What would be the format to specify?

Thanks!

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Questions regarding audio callback and decoded audio

Postby Rémi Denis-Courmont » 03 Nov 2015 09:56

That's 's32l', but it will only work on little endian platforms.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

bookie
Blank Cone
Blank Cone
Posts: 27
Joined: 29 Dec 2011 11:18

Re: Questions regarding audio callback and decoded audio

Postby bookie » 03 Nov 2015 17:55

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?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 14 guests