libao: 24-bit ALSA playback is broken
ALSA requires 24-bit samples to be padded to 32 bits.
The 24-bit linear samples use 32-bit physical space, but the sample is stored in the lower three bytes. http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html#pcm_formats
Libao used to do this correctly, but changeset r18883 (which made it in to libao 1.2) rewrote the padding code to also handle upconverting arbitrary sample sizes, by filling the low bytes with zeros. Unfortunately, ALSA's 24-bit padding works the other way around - the high byte is supposed to be zero-filled. Needless to say, padding the wrong end doesn't work very well.