Skip to content

fix: fixed channel count negotiations algorithm#1145

Open
maciejmakowski2003 wants to merge 2 commits into
mainfrom
fix/channel-count-negotiations
Open

fix: fixed channel count negotiations algorithm#1145
maciejmakowski2003 wants to merge 2 commits into
mainfrom
fix/channel-count-negotiations

Conversation

@maciejmakowski2003

@maciejmakowski2003 maciejmakowski2003 commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Closes RNAA-351

⚠️ Breaking changes ⚠️

Introduced changes

Fixed a batch of issues related to channel count negotiations.

Issue 1 - default channel count instead of computed channel count.

Let's assume below graph structure and given order of connections:
source (1ch) -> gain1 (2ch) -> gain2 (2ch)
source -> gain1: gain1 buffer correctly becomes 1ch
gain1 -> gain2: gain2 reads gain1 output buffer as 2ch so it becomes 2ch that is incorrect.

Issue 2 - no cascade to upstream nodes

Let's assume the same graph and given order of connections:
gain1 -> gain2: both gains stays with 2ch
source -> gain1: gain1 shrinks to 1ch but it was not propagated to gain2

Issue 3 - stale buffers when batching connect calls

Let's consider given order of connect method calls:

source.connect(gain1);
gain1.connect(gain2);

On the second connect buffer of gain1 is still ch2 (first buffer negotiation is only queued),.

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added/Conducted relevant tests
  • Performed self-review of the code
  • Updated Web Audio API coverage
  • Added support for web
  • Updated old arch android spec file

@maciejmakowski2003 maciejmakowski2003 requested a review from mdydek July 2, 2026 13:51
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.

1 participant