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.
This commit is contained in:
parent
0fd6fa9927
commit
a02db57291
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue