aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-29 18:35:03 +0100
committerMax Kellermann <max@duempel.org>2008-10-29 18:35:03 +0100
commit5c4dc8d03c8cfc77311a7f63282a35c9c7b82d1f (patch)
tree90e3f164a1bbb1ce1a82418cd5443b2717701bc1 /src/output
parentc6714f1755582e590b19a4dc95bebc2a9328cc2b (diff)
downloadmpd-5c4dc8d03c8cfc77311a7f63282a35c9c7b82d1f.tar.gz
mpd-5c4dc8d03c8cfc77311a7f63282a35c9c7b82d1f.tar.xz
mpd-5c4dc8d03c8cfc77311a7f63282a35c9c7b82d1f.zip
oss: check and override audio_format properly
Don't accept 24 bit audio. Force MPD to use 16 bit if anything other than 8 or 16 bit is selected.
Diffstat (limited to 'src/output')
-rw-r--r--src/output/oss_plugin.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/output/oss_plugin.c b/src/output/oss_plugin.c
index 53d047101..2992368d9 100644
--- a/src/output/oss_plugin.c
+++ b/src/output/oss_plugin.c
@@ -471,6 +471,13 @@ static int oss_open(OssData *od)
break;
case 16:
tmp = AFMT_S16_MPD;
+ break;
+
+ default:
+ /* not supported by OSS - fall back to 16 bit */
+ od->audio_format.bits = 16;
+ tmp = AFMT_S16_MPD;
+ break;
}
if (setParam(od, SNDCTL_DSP_SAMPLESIZE, &tmp)) {