From d6dd907cc87e3c6c86ec4d05a2f533bb8fcf677b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 4 Feb 2009 17:16:53 +0100 Subject: simplify code a bit by using pa_sample_size_of_format() --- src/pulsecore/resampler.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c index be390db7..78ad5530 100644 --- a/src/pulsecore/resampler.c +++ b/src/pulsecore/resampler.c @@ -156,16 +156,6 @@ static int (* const init_table[])(pa_resampler*r) = { [PA_RESAMPLER_PEAKS] = peaks_init, }; -static inline size_t sample_size(pa_sample_format_t f) { - pa_sample_spec ss = { - .format = f, - .rate = 0, - .channels = 1 - }; - - return pa_sample_size(&ss); -} - pa_resampler* pa_resampler_new( pa_mempool *pool, const pa_sample_spec *a, @@ -275,7 +265,7 @@ pa_resampler* pa_resampler_new( pa_log_info("Using %s as working format.", pa_sample_format_to_string(r->work_format)); - r->w_sz = sample_size(r->work_format); + r->w_sz = pa_sample_size_of_format(r->work_format); if (r->i_ss.format == r->work_format) r->to_work_format_func = NULL; -- cgit