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

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Mar 11 19:52:34 CET 2014

On Thu, Feb 27, 2014 at 11:14:44PM +0100, Alexandre Ratchov wrote:
> On Thu, Feb 27, 2014 at 12:19:53AM -0500, Brad Smith wrote:
> > Here is a diff from Alexandre Ratchov to fix 24-bit audio with the sndio
> > backend. Without the diff playing 24-bit audio results in white noise.
> > 
> Thanks, Brad. FWIW, the bug is that we don't set and check par.msb,
> and we end-up with the wrong encoding (ex. 24 bits lsb-aligned in
> 32-bit words, while mplayer assumes 32-bit samples).
> The diff adds the correct par.msb setting and the necessary checks,
> and enables 24-bit in 3-byte packets encodings.

I missed this before, but I am not sure this explanation is correct.
Why is setting par.bps not enough? The problem looked to me like
for bits == 24 sndio will default to bps == 4 instead of 3.
I'd prefer to describe this correctly in the commit message and
possibly split the patch if setting bps alone works.

More information about the MPlayer-dev-eng mailing list