From b05f0176d1427586e411a91cda02a8877c5c8c0d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 3 Sep 2008 20:04:26 +0200 Subject: Use S32/FLOAT32 only where available in the PA libs S32 samples are a recent addition to the PA API, so check if they are available before actually using them. --- pulse/pcm_pulse.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pulse/pcm_pulse.c b/pulse/pcm_pulse.c index fb88697..7cffc89 100644 --- a/pulse/pcm_pulse.c +++ b/pulse/pcm_pulse.c @@ -616,18 +616,26 @@ static int pulse_hw_params(snd_pcm_ioplug_t * io, case SND_PCM_FORMAT_S16_BE: pcm->ss.format = PA_SAMPLE_S16BE; break; +#ifdef PA_SAMPLE_FLOAT32LE case SND_PCM_FORMAT_FLOAT_LE: pcm->ss.format = PA_SAMPLE_FLOAT32LE; break; +#endif +#ifdef PA_SAMPLE_FLOAT32BE case SND_PCM_FORMAT_FLOAT_BE: pcm->ss.format = PA_SAMPLE_FLOAT32BE; break; +#endif +#ifdef PA_SAMPLE_S32LE case SND_PCM_FORMAT_S32_LE: pcm->ss.format = PA_SAMPLE_S32LE; break; +#endif +#ifdef PA_SAMPLE_S32BE case SND_PCM_FORMAT_S32_BE: pcm->ss.format = PA_SAMPLE_S32BE; break; +#endif default: SNDERR("PulseAudio: Unsupported format %s\n", snd_pcm_format_name(io->format)); -- cgit