feat(libwebrtc): implement the webrtc::AudioDeviceGeneric built-in effect and underrun defaults #14129
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14129"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by alvaroelpob on 2026-10-31T19:57:20Z.
What
Implements these
webrtc::AudioDeviceGenericbase methods in libwebrtc, which threw and were declared without parameters:BuiltInAECIsAvailable(),BuiltInAGCIsAvailable()andBuiltInNSIsAvailable()EnableBuiltInAEC(bool),EnableBuiltInAGC(bool)andEnableBuiltInNS(bool)GetPlayoutUnderrunCount()AudioDeviceGenericis the abstract base of the platform audio devices. A device that does not override these methods gets the base versions in its vtable, so calls through the vtable reach these exports.The module's WebRTC revision lies between M127 and M134, as recorded in the debt file by #13687.
modules/audio_device/audio_device_generic.ccis the same at M127 branch-heads/6533 and M134 branch-heads/6998, except that M134 comments out the unusedenableparameter names.The functions are adapted from
audio_device_generic.ccand live insrc/AudioDeviceGeneric.cpp, which starts with that file's WebRTC copyright notice and the BSD licence text from WebRTC'sLICENSE. The debt entry says it is adapted fromaudio_device_generic.cc.As upstream, the three availability checks return false, and the three
EnableBuiltIn*methods andGetPlayoutUnderrunCountreturn -1. None of them reads the device, so its layout is not needed. Upstream also logsRTC_LOG_F(LS_ERROR) << "Not supported on this platform"on each call. libwebrtc's logging is not implemented, so that is recorded as debt. The iOS-onlyGetPlayoutAudioParametersandGetRecordAudioParametersare not in the module. The inventory drops from 386 to 379.Tested
Ubuntu 26.04 (WSL2, kernel 6.18), GCC 15.2.0, Release, full build with
BUILD_TESTING=ON.guest_webrtc_audio_device_generictest, on a device filled with 0xC3:EnableBuiltIn*methods return -1 for bothtrueandfalse, and AEC stays unavailable afterwards.GetPlayoutUnderrunCountreturns -1.ctest -j16on head 61396729f3: 3037/3037 pass.check_conventions.py --base upstream/mainpasses.pr_overlap.pyreports the open pull requests listed in Depends on.1bc97b9527after #13736 merged; the only conflicts were the include, CMake source and debt count lines. Fullctest -j16on the top of the stack, #14148 head 0884de5716 (which contains this head, 2a05226ae3): 3087/3087 pass.check_conventions.py --base upstream/mainpasses.dc9dc7eaaeafter #13764 and #13816 merged. The conflicts were the debt count line and, in the AudioDeviceGeneric commit, theExport.cppstubs next to the removed VAD stubs; that commit keepsmain's side and removes only its own seven stubs. The count is now set from the stubs left inExport.cppplus the 60 bound by NID (35631 on this head,
143089f08a). Fullctest -j16on the top of the stack, #14148 head44e052f6dd: 3113/3113 pass.check_conventions.py --base upstream/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:49:25Z.
Review: COMMENTED
Withdrawn. This review applied a title-ID/log requirement that is not in CONTRIBUTING (
Unblocks: noneis allowed), and it contained no code review.