]> git.alsa-project.org Git - alsa-plugins.git/commitdiff
Use S32/FLOAT32 only where available in the PA libs
authorLennart Poettering <lennart@poettering.net>
Wed, 3 Sep 2008 18:04:26 +0000 (20:04 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 3 Sep 2008 18:25:38 +0000 (20:25 +0200)
S32 samples are a recent addition to the PA API, so check if they are available
before actually using them.

pulse/pcm_pulse.c

index fb88697beeb4a9903e0c3940d0c9dc67a697d7a1..7cffc89bb377b98273e5912613386b80318a414e 100644 (file)
@@ -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));