[pulseaudio-discuss] [PATCH 09/18] resampler: Add assert to set_input/output_rate
poljar (Damir Jelić)
poljarinho at gmail.com
Mon Jul 15 06:48:31 PDT 2013
This adds asserts to check if the implementation has an update rate
function defined.
---
src/pulsecore/resampler.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index ea5f1aa..35342af 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -456,6 +456,7 @@ void pa_resampler_free(pa_resampler *r) {
void pa_resampler_set_input_rate(pa_resampler *r, uint32_t rate) {
pa_assert(r);
pa_assert(rate > 0);
+ pa_assert(r->implementation.update_rates);
if (r->i_ss.rate == rate)
return;
@@ -468,6 +469,7 @@ void pa_resampler_set_input_rate(pa_resampler *r, uint32_t rate) {
void pa_resampler_set_output_rate(pa_resampler *r, uint32_t rate) {
pa_assert(r);
pa_assert(rate > 0);
+ pa_assert(r->implementation.update_rates);
if (r->o_ss.rate == rate)
return;
--
1.8.3.2
More information about the pulseaudio-discuss
mailing list