Commit a02db572 authored by Max Kellermann's avatar Max Kellermann

pulse: force 16 bit audio sample format

PA_SAMPLE_S16NE is the only sample format which is suported by both MPD and pulseaudio. Unfortunately, pulse does not accept 24 bit samples. Instead of bailing out with an error message, we should tell the MPD core to convert all samples to 16 bit for pulse.
parent 0fd6fa99
......@@ -131,11 +131,9 @@ static int pulse_openDevice(void *data,
pd->connAttempts++;
pd->lastAttempt = t;
if (audioFormat->bits != 16) {
ERROR("PulseAudio doesn't support %i bit audio\n",
audioFormat->bits);
return -1;
}
/* MPD doesn't support the other pulseaudio sample formats, so
we just force MPD to send us everything as 16 bit */
audioFormat->bits = 16;
ss.format = PA_SAMPLE_S16NE;
ss.rate = audioFormat->sample_rate;
......
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