[MPlayer-dev-eng] [PATCH] Fix playback of 24-bit audio when sndio ao is used

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Mar 12 08:03:19 CET 2014

On 12.03.2014, at 07:13, Alexandre Ratchov <alex at caoua.org> wrote:

> On Tue, Mar 11, 2014 at 08:51:06PM +0100, Reimar Döffinger wrote:
>> So setting par.bps = 3; does not work for convincing sndio
>> to take a real 24 bit format (3 byte/sample) as input?
>> The documentation to sounded like it would, as long as
>> you explicitly set par.bps to 3.
> basically, the audio layer does:
>    if (ISSET(par.bits) {
>        if (ISSET(par.bps)) {
>            /* set packet size */
>        }
>        /* set encoding */
>    }
> so if par.bits is not set then the code to set the encoding is not
> triggered. It's this way because par.bps was added later; but the
> way you thought it works makes more sense; this will probably
> change.

I don't follow, the code you quoted matches my understanding (even if it's as you say maybe not ideal).
We did already set par.bits. By just adding setting par.bps we should be getting the desired 24 bit format MPlayer wanted, right?
Thus the whole par.msb-related code should just be an additional safety net but not normally necessary to make 24 bit audio working? That was the main question I was wondering about.

More information about the MPlayer-dev-eng mailing list