diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-01-27 00:52:28 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-01-27 00:52:28 +0100 |
commit | 9ba408415c28c1113291062b4dbb38cf90a3c232 (patch) | |
tree | efccf01621d4f0a67380bffea2b189347a76e922 /src/pulsecore/sink-input.c | |
parent | ccd21f33cf254cad6348769b42646fe8b0c5d0a5 (diff) |
store requested resampling method in a seperate field and use it when create a new resampler after a move
Diffstat (limited to 'src/pulsecore/sink-input.c')
-rw-r--r-- | src/pulsecore/sink-input.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index e25e0c22..a33d62ff 100644 --- a/src/pulsecore/sink-input.c +++ b/src/pulsecore/sink-input.c @@ -218,8 +218,6 @@ pa_sink_input* pa_sink_input_new( pa_log_warn("Unsupported resampling operation."); return NULL; } - - data->resample_method = pa_resampler_get_method(resampler); } i = pa_msgobject_new(pa_sink_input); @@ -235,7 +233,8 @@ pa_sink_input* pa_sink_input_new( i->sink = data->sink; i->client = data->client; - i->resample_method = data->resample_method; + i->requested_resample_method = data->resample_method; + i->actual_resample_method = resampler ? pa_resampler_get_method(resampler) : PA_RESAMPLER_INVALID; i->sample_spec = data->sample_spec; i->channel_map = data->channel_map; @@ -946,7 +945,7 @@ void pa_sink_input_set_name(pa_sink_input *i, const char *name) { pa_resample_method_t pa_sink_input_get_resample_method(pa_sink_input *i) { pa_sink_input_assert_ref(i); - return i->resample_method; + return i->actual_resample_method; } /* Called from main context */ @@ -1062,7 +1061,7 @@ int pa_sink_input_finish_move(pa_sink_input *i, pa_sink *dest) { i->core->mempool, &i->sample_spec, &i->channel_map, &dest->sample_spec, &dest->channel_map, - i->resample_method, + i->requested_resample_method, ((i->flags & PA_SINK_INPUT_VARIABLE_RATE) ? PA_RESAMPLER_VARIABLE_RATE : 0) | ((i->flags & PA_SINK_INPUT_NO_REMAP) ? PA_RESAMPLER_NO_REMAP : 0) | (i->core->disable_remixing || (i->flags & PA_SINK_INPUT_NO_REMIX) ? PA_RESAMPLER_NO_REMIX : 0)))) { |