module-roc: try to switch rates

Try to switch the graph to 44100Hz.
This commit is contained in:
Wim Taymans 2022-04-25 15:34:05 +02:00
parent 4885baabb1
commit 1e244b4ebd
2 changed files with 4 additions and 0 deletions

View file

@ -299,6 +299,8 @@ static int roc_sink_setup(struct module_roc_sink_data *data)
info.position[0] = SPA_AUDIO_CHANNEL_FL; info.position[0] = SPA_AUDIO_CHANNEL_FL;
info.position[1] = SPA_AUDIO_CHANNEL_FR; info.position[1] = SPA_AUDIO_CHANNEL_FR;
pw_properties_setf(data->capture_props, PW_KEY_NODE_RATE, "1/%d", info.rate);
data->sender = roc_sender_open(data->context, &sender_config); data->sender = roc_sender_open(data->context, &sender_config);
if (!data->sender) { if (!data->sender) {
pw_log_error("Failed to create roc sender"); pw_log_error("Failed to create roc sender");

View file

@ -331,6 +331,8 @@ static int roc_source_setup(struct module_roc_source_data *data)
info.position[1] = SPA_AUDIO_CHANNEL_FR; info.position[1] = SPA_AUDIO_CHANNEL_FR;
data->stride = info.channels * sizeof(float); data->stride = info.channels * sizeof(float);
pw_properties_setf(data->playback_props, PW_KEY_NODE_RATE, "1/%d", info.rate);
if (roc_parse_resampler_profile(&receiver_config.resampler_profile, if (roc_parse_resampler_profile(&receiver_config.resampler_profile,
data->resampler_profile)) { data->resampler_profile)) {
pw_log_error("Invalid resampler profile"); pw_log_error("Invalid resampler profile");