diff options
author | Max Kellermann <max@duempel.org> | 2008-10-29 18:35:03 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-29 18:35:03 +0100 |
commit | 5c4dc8d03c8cfc77311a7f63282a35c9c7b82d1f (patch) | |
tree | 90e3f164a1bbb1ce1a82418cd5443b2717701bc1 | |
parent | c6714f1755582e590b19a4dc95bebc2a9328cc2b (diff) | |
download | mpd-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 '')
-rw-r--r-- | src/output/oss_plugin.c | 7 |
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)) { |