From: Lennart Poettering Date: Wed, 3 Sep 2008 18:04:26 +0000 (+0200) Subject: Use S32/FLOAT32 only where available in the PA libs X-Git-Tag: v1.0.18rc3~5 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=b05f0176d1427586e411a91cda02a8877c5c8c0d;p=alsa-plugins.git 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. --- 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));