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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user