Skip to content

Extract channel mixing matrix construction out of AudioMixer - #3200

Open
khamidjon-khamidov wants to merge 1 commit into
google:mainfrom
khamidjon-khamidov:audio-channel-matrix
Open

khamidjon-khamidov wants to merge 1 commit into
google:mainfrom
khamidjon-khamidov:audio-channel-matrix

Conversation

@khamidjon-khamidov

Copy link
Copy Markdown

AudioMixer::OnPlayback built its channel map by writing the stream volume onto
the diagonal of a shared 6x6 identity member, under the mixer lock. Move that
into a standalone audio_channel_matrix unit and build the matrix locally.

No functional change: ConvertAudioStream only reads [i][j] for i < dst_channels
and j < src_channels, so the dst x src diagonal is identical to the old 6x6 one.

This is a part of set of PRs to support car audio controls (fade/balance/ducking/mute/focus).

Bug: b/563302839

Comment thread base/cvd/cuttlefish/host/frontend/webrtc/audio_channel_matrix.h Outdated
Comment thread base/cvd/cuttlefish/host/frontend/webrtc/audio_channel_matrix.h Outdated
Comment thread base/cvd/cuttlefish/host/frontend/webrtc/audio_channel_matrix.cpp
AudioMixer::OnPlayback built its channel map by writing the stream volume onto
the diagonal of a shared 6x6 identity member, under the mixer lock. Move that
into a standalone audio_channel_matrix unit and build the matrix locally.

No functional change: ConvertAudioStream only reads [i][j] for i < dst_channels
and j < src_channels, so the dst x src diagonal is identical to the old 6x6 one.

Keeping the mixing math in a standalone unit makes it testable on its own and
gives a single place to add spatial processing (fade, balance, ducking,
ITU-R BS.775 downmixing) later on.

This is a part of set of PRs to support car audio controls (fade/balance/ducking/mute/focus).

Bug: b/563302839
@jemoreira
jemoreira enabled auto-merge September 21, 2026 18:06
@jemoreira jemoreira added the kokoro:run Run e2e tests. label Sep 21, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Sep 21, 2026
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.

3 participants