diff options
author | Max Kellermann <max@duempel.org> | 2008-12-09 07:39:24 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-12-09 07:39:24 +0100 |
commit | 0dab2c5bc1bc7b424ec7d04a1089fa181ca89082 (patch) | |
tree | 03e851dc55e9c1e222eed0ce46c587ecb6469b36 | |
parent | 4288cc069aa852646b57f3d5ca0c156f8781f404 (diff) | |
download | mpd-0dab2c5bc1bc7b424ec7d04a1089fa181ca89082.tar.gz mpd-0dab2c5bc1bc7b424ec7d04a1089fa181ca89082.tar.xz mpd-0dab2c5bc1bc7b424ec7d04a1089fa181ca89082.zip |
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.
-rw-r--r-- | src/output/ao_plugin.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/output/ao_plugin.c b/src/output/ao_plugin.c index 3907448ae..4c69592ff 100644 --- a/src/output/ao_plugin.c +++ b/src/output/ao_plugin.c @@ -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; |