Commit 0dab2c5b authored by Max Kellermann's avatar Max Kellermann

ao: use 16 bit sample format

There have been bug reports on MPD regarding 24 bit output via libao/esd. The "ao" plugin does not attempt fall back to 16 bit currently, and thus fails to play 24 bit audio (i.e. all mp3 files). Make it always use 16 bit samples for now, until more bits are well-tested.
parent 4288cc06
......@@ -201,6 +201,12 @@ audioOutputAo_openDevice(void *data, struct audio_format *audio_format)
audioOutputAo_closeDevice(ad);
}
/* support for 24 bit samples in libao is currently dubious,
and until we have sorted that out, resample everything to
16 bit */
if (audio_format->bits > 16)
audio_format->bits = 16;
format.bits = audio_format->bits;
format.rate = audio_format->sample_rate;
format.byte_format = AO_FMT_NATIVE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment