mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
source: Bring rate update code in sync with sink code
Basically adds code to handle passthrough sources. This isn't a tested path at the moment, but in the future, when we do wish to support these, it'll save us the trouble of having to sync all the code again.
This commit is contained in:
parent
b232fbd8f8
commit
b9ff90fef8
4 changed files with 32 additions and 21 deletions
|
|
@ -354,7 +354,11 @@ int pa_source_output_new(
|
|||
module-suspend-on-idle can resume a source */
|
||||
|
||||
pa_log_info("Trying to change sample rate");
|
||||
pa_source_update_rate(data->source, data->sample_spec.rate);
|
||||
if (pa_source_update_rate(data->source, data->sample_spec.rate, pa_source_output_new_data_is_passthrough(data)) == TRUE)
|
||||
pa_log_info("Rate changed to %u kHz",
|
||||
data->source->sample_spec.rate);
|
||||
else
|
||||
pa_log_info("Resampling enabled to %u kHz", data->source->sample_spec.rate);
|
||||
}
|
||||
|
||||
if (data->resample_method == PA_RESAMPLER_INVALID)
|
||||
|
|
@ -1401,7 +1405,7 @@ int pa_source_output_finish_move(pa_source_output *o, pa_source *dest, pa_bool_t
|
|||
SOURCE_OUTPUT_MOVE_FINISH hook */
|
||||
|
||||
pa_log_info("Trying to change sample rate");
|
||||
if (pa_source_update_rate(dest, o->sample_spec.rate) == TRUE)
|
||||
if (pa_source_update_rate(dest, o->sample_spec.rate, pa_source_output_is_passthrough(o)) == TRUE)
|
||||
pa_log_info("Rate changed to %u kHz",
|
||||
dest->sample_spec.rate);
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue