summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/resampler.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-02-04 17:16:53 +0100
committerLennart Poettering <lennart@poettering.net>2009-02-04 17:16:53 +0100
commitd6dd907cc87e3c6c86ec4d05a2f533bb8fcf677b (patch)
treee7585b5e1a0d1a35f5c09aa072c7d7f1e3973ca6 /src/pulsecore/resampler.c
parenta6fe99171669ae03fd5453cc8fa924f21dc9a050 (diff)
simplify code a bit by using pa_sample_size_of_format()
Diffstat (limited to 'src/pulsecore/resampler.c')
-rw-r--r--src/pulsecore/resampler.c12
1 files changed, 1 insertions, 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;