diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-11-20 16:23:53 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-11-20 16:23:53 +0000 |
commit | 5f647c8fef33f35210d550ad1477ef43520b32a3 (patch) | |
tree | c6eb28bbbca0966dede1d7635f67b471fef06924 /polyp/source-output.c | |
parent | 8641af3c6d11e3e6710cb946e9a93d0e9f639519 (diff) |
* add µlaw/alaw support
* abstracted resampler API
* add integer-only resampler ("trivial")
* show used resampler wherever useful
* add mixing/volume adjusting for float32ne and u8
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@294 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/source-output.c')
-rw-r--r-- | polyp/source-output.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/polyp/source-output.c b/polyp/source-output.c index e339d4ac..fb06ff8f 100644 --- a/polyp/source-output.c +++ b/polyp/source-output.c @@ -44,7 +44,7 @@ struct pa_source_output* pa_source_output_new(struct pa_source *s, const char *n return NULL; } - if (resample_method < 0) + if (resample_method == PA_RESAMPLER_INVALID) resample_method = s->core->resample_method; if (!pa_sample_spec_equal(&s->sample_spec, spec)) @@ -175,3 +175,12 @@ void pa_source_output_cork(struct pa_source_output *o, int b) { o->state = b ? PA_SOURCE_OUTPUT_CORKED : PA_SOURCE_OUTPUT_RUNNING; } + +enum pa_resample_method pa_source_output_get_resample_method(struct pa_source_output *o) { + assert(o && o->ref >= 1); + + if (!o->resampler) + return PA_RESAMPLER_INVALID; + + return pa_resampler_get_method(o->resampler); +} |