Skip to content

feat: add ALSA audio capturer and refactor audio capturing architecture#329

Merged
TzuHuanTai merged 2 commits intomainfrom
feat/add-ALSA-audio-capturer-and-refactor-audio-capturing-architecture
May 3, 2026
Merged

feat: add ALSA audio capturer and refactor audio capturing architecture#329
TzuHuanTai merged 2 commits intomainfrom
feat/add-ALSA-audio-capturer-and-refactor-audio-capturing-architecture

Conversation

@TzuHuanTai
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings April 27, 2026 09:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an ALSA-based audio capturer and refactors the audio capture pipeline behind a shared AudioCapturer abstraction, with runtime fallback from PulseAudio to ALSA when initializing WebRTC’s audio backend.

Changes:

  • Introduce AudioCapturer/AudioBuffer interface and migrate recorder + conductor to use it.
  • Add AlsaCapturer implementation and select it when PulseAudio ADM initialization fails.
  • Remove legacy Pa2Capturer and update build to link ALSA.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/rtc/conductor.h Switch conductor audio source type to AudioCapturer and track ALSA usage.
src/rtc/conductor.cpp Add PulseAudio→ALSA fallback for WebRTC ADM and choose matching capturer.
src/recorder/recorder_manager.h Update recorder API to accept AudioCapturer sources.
src/recorder/recorder_manager.cpp Adjust audio recorder creation/subscription to AudioBuffer.
src/recorder/audio_recorder.h Migrate recorder template parameter from PaBuffer to AudioBuffer.
src/recorder/audio_recorder.cpp Update OnBuffer implementation to consume AudioBuffer.
src/capturer/pa_capturer.h Refactor PulseAudio capturer to implement AudioCapturer.
src/capturer/pa_capturer.cpp Update PulseAudio factory/ctor and keep emitting AudioBuffer.
src/capturer/pa2_capturer.h Remove legacy PulseAudio capturer variant.
src/capturer/pa2_capturer.cpp Remove legacy PulseAudio capturer variant implementation.
src/capturer/audio_capturer.h New audio capturer abstraction and shared buffer type.
src/capturer/alsa_capturer.h New ALSA capturer header.
src/capturer/alsa_capturer.cpp New ALSA capturer implementation with sample format conversion to float.
src/capturer/CMakeLists.txt Add ALSA source + pkg-config dependency and link settings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/recorder/recorder_manager.h
Comment thread src/capturer/audio_capturer.h
Comment thread src/rtc/conductor.cpp
@TzuHuanTai TzuHuanTai force-pushed the feat/add-ALSA-audio-capturer-and-refactor-audio-capturing-architecture branch from 4cb121f to cf911e7 Compare May 3, 2026 11:35
@TzuHuanTai TzuHuanTai merged commit aa57ddb into main May 3, 2026
7 checks passed
@TzuHuanTai TzuHuanTai deleted the feat/add-ALSA-audio-capturer-and-refactor-audio-capturing-architecture branch May 3, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants