diff options
author | Max Kellermann <max@duempel.org> | 2008-10-25 20:41:28 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-25 20:41:28 +0200 |
commit | a02db572919c7b7c21e023f45d3d11feaae4f54e (patch) | |
tree | 4b386a8f6d0fbfe1453ac3dd6ae45c1b20ea64e4 /src/audioOutputs | |
parent | 0fd6fa9927dcfd619954d0dd5fdc965a83f0223d (diff) | |
download | mpd-a02db572919c7b7c21e023f45d3d11feaae4f54e.tar.gz mpd-a02db572919c7b7c21e023f45d3d11feaae4f54e.tar.xz mpd-a02db572919c7b7c21e023f45d3d11feaae4f54e.zip |
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.
Diffstat (limited to 'src/audioOutputs')
-rw-r--r-- | src/audioOutputs/audioOutput_pulse.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/audioOutputs/audioOutput_pulse.c b/src/audioOutputs/audioOutput_pulse.c index 93a1d8b37..b1ce3d049 100644 --- a/src/audioOutputs/audioOutput_pulse.c +++ b/src/audioOutputs/audioOutput_pulse.c @@ -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; |