From 6acfb53884c6f3936030fe43a584bfa01c27d3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Thu, 20 Jun 2024 03:00:41 +0200 Subject: [PATCH] pipewire: module-roc-sink: explicity specify sender packet encoding roc-toolkit commit 03d29eb97211ca87593566998c5087590c1bae38 [0] ("Add sample_format() and pcm_format() to SampleSpec") made a change in how the packet encoding is determined. Specifically: This commit introduces small breaking change in C API: when we search for packet_encoding compatible with frame_encoding, we now take into account format too. It means that if you use ROC_FORMAT_PCM_FLOAT32 in frame_encoding, ROC_PACKET_ENCODING_AVP_L16_STEREO will not be selected automatically anymore, and you need to specify it manually via packet_encoding. This causes module-roc-sink to fail to set up the ROC sender: roc_api: bad configuration: failed to select packet_encoding matching frame_encoding, set roc_sender_config.packet_encoding manually So specify `ROC_PACKET_ENCODING_AVP_L16_STEREO` explicitly as the packet encoding. This seems to work with roc-toolkit 0.3, so the required version is not changed. Fixes #4070 [0]: https://github.com/roc-streaming/roc-toolkit/commit/03d29eb97211ca87593566998c5087590c1bae38 --- src/modules/module-roc-sink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/module-roc-sink.c b/src/modules/module-roc-sink.c index 06af90f47..5eba09550 100644 --- a/src/modules/module-roc-sink.c +++ b/src/modules/module-roc-sink.c @@ -264,6 +264,7 @@ static int roc_sink_setup(struct module_roc_sink_data *data) sender_config.frame_encoding.rate = data->rate; sender_config.frame_encoding.channels = ROC_CHANNEL_LAYOUT_STEREO; sender_config.frame_encoding.format = ROC_FORMAT_PCM_FLOAT32; + sender_config.packet_encoding = ROC_PACKET_ENCODING_AVP_L16_STEREO; sender_config.fec_encoding = data->fec_code; info.rate = data->rate;