diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-09-03 20:04:26 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-09-03 20:25:38 +0200 |
commit | b05f0176d1427586e411a91cda02a8877c5c8c0d (patch) | |
tree | 907f153b4dcce37da6f490163af8f1576d93f794 | |
parent | d0e5d3638fcc30c01d59742fbf6dbe15d4ec610e (diff) |
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.
-rw-r--r-- | pulse/pcm_pulse.c | 8 |
1 files changed, 8 insertions, 0 deletions
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)); |