webrtcdsp: echo cancellation issue with stereo signal
Describe your issue
The echo cancellation feature of webrtcdsp breaks the stereo of an audio signal.
Discussed here: https://discourse.gstreamer.org/t/webrtcdsp-stereo-echo-cancellation/739/2
Expected Behavior
Captured stereo should be played back as is by the speakers.
gst-launch-1.0 alsasrc ! webrtcdsp echo-cancel=true ! webrtcechoprobe ! audioconvert ! alsasink
Observed Behavior
Only one channel is output. Goes back to normal with echo-cancel=false.
Setup
- Operating System: Ubuntu 22.04
- Device: Computer
- GStreamer Version: 1.23.1 (commit 79ffe4f4)
Steps to reproduce the bug
This pipeline sends two different signals on the left and right channels. Using echo-cancel=true or false, the stereo is degraded.
gst-launch-1.0 \
audiotestsrc volume=0.1 ! capsfilter caps=audio/x-raw,format=S16LE,rate=8000,channels=1,channel-mask=\(bitmask\)0x1 name=left \
audiotestsrc freq=1320 volume=0.1 ! capsfilter caps=audio/x-raw,format=S16LE,rate=8000,channels=1,channel-mask=\(bitmask\)0x2 name=right \
interleave name=i left. ! i. right. ! i. \
i. ! webrtcdsp echo-cancel=true ! webrtcechoprobe \
! audioconvert ! audioresample ! alsasink
How reproducible is the bug?
Systematic
Additional Information
Discussed with @fengalin. The regression seems to have appeared since d5755744