mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-12 13:30:10 -05:00
sink-input: Don't resample passthrough inputs
This commit is contained in:
parent
233ef98bf1
commit
881074907e
1 changed files with 14 additions and 12 deletions
|
|
@ -295,18 +295,20 @@ int pa_sink_input_new(
|
||||||
!pa_sample_spec_equal(&data->sample_spec, &data->sink->sample_spec) ||
|
!pa_sample_spec_equal(&data->sample_spec, &data->sink->sample_spec) ||
|
||||||
!pa_channel_map_equal(&data->channel_map, &data->sink->channel_map)) {
|
!pa_channel_map_equal(&data->channel_map, &data->sink->channel_map)) {
|
||||||
|
|
||||||
if (!(resampler = pa_resampler_new(
|
/* Note: for passthrough content we need to adjust the output rate to that of the current sink-input */
|
||||||
core->mempool,
|
if (!(data->flags & PA_SINK_INPUT_PASSTHROUGH)) /* no resampler for passthrough content */
|
||||||
&data->sample_spec, &data->channel_map,
|
if (!(resampler = pa_resampler_new(
|
||||||
&data->sink->sample_spec, &data->sink->channel_map,
|
core->mempool,
|
||||||
data->resample_method,
|
&data->sample_spec, &data->channel_map,
|
||||||
((data->flags & PA_SINK_INPUT_VARIABLE_RATE) ? PA_RESAMPLER_VARIABLE_RATE : 0) |
|
&data->sink->sample_spec, &data->sink->channel_map,
|
||||||
((data->flags & PA_SINK_INPUT_NO_REMAP) ? PA_RESAMPLER_NO_REMAP : 0) |
|
data->resample_method,
|
||||||
(core->disable_remixing || (data->flags & PA_SINK_INPUT_NO_REMIX) ? PA_RESAMPLER_NO_REMIX : 0) |
|
((data->flags & PA_SINK_INPUT_VARIABLE_RATE) ? PA_RESAMPLER_VARIABLE_RATE : 0) |
|
||||||
(core->disable_lfe_remixing ? PA_RESAMPLER_NO_LFE : 0)))) {
|
((data->flags & PA_SINK_INPUT_NO_REMAP) ? PA_RESAMPLER_NO_REMAP : 0) |
|
||||||
pa_log_warn("Unsupported resampling operation.");
|
(core->disable_remixing || (data->flags & PA_SINK_INPUT_NO_REMIX) ? PA_RESAMPLER_NO_REMIX : 0) |
|
||||||
return -PA_ERR_NOTSUPPORTED;
|
(core->disable_lfe_remixing ? PA_RESAMPLER_NO_LFE : 0)))) {
|
||||||
}
|
pa_log_warn("Unsupported resampling operation.");
|
||||||
|
return -PA_ERR_NOTSUPPORTED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
i = pa_msgobject_new(pa_sink_input);
|
i = pa_msgobject_new(pa_sink_input);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue