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

Alexandre Ratchov alex at caoua.org
Wed Mar 12 07:13:55 CET 2014


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.

> Either way I committed the patch so it should at least be
> working, I just prefer to also understand the details.

sure; please do. This makes the code better in the long term.

-- Alexandre


More information about the MPlayer-dev-eng mailing list