Commit 5c4dc8d0 authored by Max Kellermann's avatar Max Kellermann

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.
parent c6714f17
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment