[pulseaudio-commits] 2 commits - src/pulsecore
Arun Raghavan
arun at kemper.freedesktop.org
Mon Dec 12 20:01:26 PST 2011
src/pulsecore/resampler.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit dc8edf4b43bf20e9edf6efd31836218924fad1f0
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Tue Dec 13 09:26:44 2011 +0530
resampler: Move some peak resampler asserts around
This moves a couple of asserts from peak_resample() to peaks_init()
since they're resampler parameters that shouldn't change after
initialisation.
diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index 67f800b..6676943 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -1494,8 +1494,6 @@ static void peaks_resample(pa_resampler *r, const pa_memchunk *input, unsigned i
pa_assert(input);
pa_assert(output);
pa_assert(out_n_frames);
- pa_assert(r->i_ss.rate >= r->o_ss.rate);
- pa_assert(r->work_format == PA_SAMPLE_S16NE || r->work_format == PA_SAMPLE_FLOAT32NE);
src = (uint8_t*) pa_memblock_acquire(input->memblock) + input->index;
dst = (uint8_t*) pa_memblock_acquire(output->memblock) + output->index;
@@ -1592,6 +1590,8 @@ static void peaks_update_rates_or_reset(pa_resampler *r) {
static int peaks_init(pa_resampler*r) {
pa_assert(r);
+ pa_assert(r->i_ss.rate >= r->o_ss.rate);
+ pa_assert(r->work_format == PA_SAMPLE_S16NE || r->work_format == PA_SAMPLE_FLOAT32NE);
r->peaks.o_counter = r->peaks.i_counter = 0;
memset(r->peaks.max_i, 0, sizeof(r->peaks.max_i));
commit a0b5f29b4289d5307104a52f4fbb66b45cc6dba0
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Tue Dec 13 09:25:04 2011 +0530
resampler: Remove invalid channel asserts in peak and trivial
The incoming channel count will be fixed up by the remapping code before
the resampler is invoked.
diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index b56c1f5..67f800b 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -1421,7 +1421,6 @@ static void trivial_resample(pa_resampler *r, const pa_memchunk *input, unsigned
pa_assert(input);
pa_assert(output);
pa_assert(out_n_frames);
- pa_assert(r->i_ss.channels == r->o_ss.channels);
fz = r->w_sz * r->o_ss.channels;
@@ -1496,7 +1495,6 @@ static void peaks_resample(pa_resampler *r, const pa_memchunk *input, unsigned i
pa_assert(output);
pa_assert(out_n_frames);
pa_assert(r->i_ss.rate >= r->o_ss.rate);
- pa_assert(r->i_ss.channels == r->o_ss.channels);
pa_assert(r->work_format == PA_SAMPLE_S16NE || r->work_format == PA_SAMPLE_FLOAT32NE);
src = (uint8_t*) pa_memblock_acquire(input->memblock) + input->index;
More information about the pulseaudio-commits
mailing list