[vlc-devel] [RFC] Android OpenSL ES audio output

Rémi Denis-Courmont remi at remlab.net
Fri Jun 3 12:37:30 CEST 2011

On Fri, 3 Jun 2011 18:22:15 +0900, Dominique Martinet
<asmadeus at codewreck.org> wrote:

> The only advantage I see to the linked list is that we can decide the
> number of buffers we want to append based on the size of a sample for
> example.. but I'm not sure how helpful it is though (it's only the
> maximum size and it's only the audio core which decides when to enqueue,
> I would need to check how far ahead it actually is but probably not
> much)

The audio core does not currently decide much. It just resamples as
required by the audio output speed relative to the input clock, then cuts
the audio blocks coming from the decoder into audio blocks of the exact
size requested by the audio output.

In fact, I would very much like to remove that,
aout_instance_t.output.i_nb_samples. Most if not all audio outputs can cope
with arbitrary-sized buffers, as they will anyway copy samples _again_ from
the VLC mixed buffers into the hardware buffers. Thus, this resizing of
audio buffers just adds one extra memory and extra latency into the audio
pipeline. The net effect is an increase the likelihood of hardware output

Rémi Denis-Courmont

More information about the vlc-devel mailing list