Skip to content

pulse: Expose the correct max rate that we support

Arun Raghavan requested to merge arun/gst-plugins-good:pulse-rate-fix into master

PulseAudio defines PA_RATE_MAX as the maximum sampling rate that it supports. We were previously exposing a maximum rate of INT_MAX, which is incorrect, but worked because nothing was really using a rate greater than 384000 kHz.

While playing DSD data, we hit a case where there might be very high sample rates (>1MHz), and pulsesink fails during stream creation with such streams because it erroneously advertises that it supports such rates.

Since PA_RATE_MAX is #define'd to (8*48000U), we can't just use it in the caps string. Instead, we fix up the rate to what we actually support whenever we use our macro caps.

Merge request reports