aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-02-28 00:09:45 +0100
committerMax Kellermann <max@duempel.org>2011-02-28 00:09:45 +0100
commita1d1c2beaa54f76bbf92b2a5fd83c4a582a0316b (patch)
tree578e387c4d64cc65ad5bb341981a8fe13b04f0f0
parentee9c60fad46c1da7c517b84e37a9c4bc41949efd (diff)
downloadmpd-a1d1c2beaa54f76bbf92b2a5fd83c4a582a0316b.tar.gz
mpd-a1d1c2beaa54f76bbf92b2a5fd83c4a582a0316b.tar.xz
mpd-a1d1c2beaa54f76bbf92b2a5fd83c4a582a0316b.zip
output/oss: disable 24 bit playback on FreeBSD
See code comment.
Diffstat (limited to '')
-rw-r--r--NEWS1
-rw-r--r--src/output/oss_plugin.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 64353a7c0..38fcd4155 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ ver 0.16.2 (2011/??/??)
* output:
- httpd: fix uninitialized variable
- oss: AFMT_S24_PACKED is little-endian
+ - oss: disable 24 bit playback on FreeBSD
ver 0.16.1 (2011/01/09)
diff --git a/src/output/oss_plugin.c b/src/output/oss_plugin.c
index 26d674e33..9261b423c 100644
--- a/src/output/oss_plugin.c
+++ b/src/output/oss_plugin.c
@@ -41,6 +41,15 @@
# include <sys/soundcard.h>
#endif /* !(defined(__OpenBSD__) || defined(__NetBSD__) */
+/* We got bug reports from FreeBSD users who said that the two 24 bit
+ formats generate white noise on FreeBSD, but 32 bit works. This is
+ a workaround until we know what exactly is expected by the kernel
+ audio drivers. */
+#ifndef __linux__
+#undef AFMT_S24_PACKED
+#undef AFMT_S24_NE
+#endif
+
struct oss_data {
int fd;
const char *device;