[vlc-devel] [PATCH] android: Change the buffer length for opensles

Rémi Denis-Courmont remi at remlab.net
Tue Feb 28 12:05:16 CET 2012

On Tue, 28 Feb 2012 10:53:08 +0100, Dominique Martinet
<asmadeus at codewreck.org> wrote:
> It's not hard to do, but I have no idea what settings are to be
> accounted for to pick a sane length.

None. The number of samples in a given block is not known (it depends on
the audio codec) nor fixed (filters can change block length). So the total
number of buffers is rather irrelevant.

Since blocks are not empty, there cannot be more than
   AOUT_MAX_ADVANCE_TIME * maximum sample rate
 * minimum sample per block / CLOCK_FREQ
 <= 576000 decoded blocks in the pipeline at a time.

That's a lot though.

> If you've got more samples that don't play, I'm willing to look
> into proper rules, but I can't just pull it of my hat)

To be clear: counting blocks makes no sense.

Rémi Denis-Courmont

More information about the vlc-devel mailing list