[MPlayer-dev-eng] [PATCH] Fix playback of 24-bit audio when sndio ao is used
alex at caoua.org
Tue Mar 11 20:19:18 CET 2014
On Tue, Mar 11, 2014 at 07:52:34PM +0100, Reimar Döffinger wrote:
> 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?
par.bits must be set to change the encoding, par.bps is optional.
> The problem looked to me like
> for bits == 24 sndio will default to bps == 4 instead of 3.
Exactly. And in this case the 24-bits may end up LSB-aligned, so
the format is not equivalent to 32-bit (with LSB discarded).
More information about the MPlayer-dev-eng