Skip to content

feat: let audio sinks take one reused array instead of a new one per chunk - #521

Merged
devopvoid merged 1 commit into
mainfrom
feat/reused-audio-sink-arrays
Nov 2, 2026
Merged

devopvoid merged 1 commit into
mainfrom
feat/reused-audio-sink-arrays

Conversation

@devopvoid

Copy link
Copy Markdown
Owner
  • AudioTrack.addSink(sink, AudioDataAccess.REUSED) hands the sink one array per sink, refilled on every chunk and valid only until the callback returns. COPY stays the default, so existing sinks keep getting an array of their own.
  • The array follows the chunk size; a delivery on a second thread at the same time gets an array of its own.
  • Remote audio of the client API registers its dispatcher with REUSED, since it copied every chunk anyway.

…chunk

AudioTrack.addSink(sink, AudioDataAccess.REUSED) hands a sink the same array in every call, valid until the call returns. COPY stays the default. The client API's audio dispatcher, which copies each chunk anyway, now takes the reused array.
@devopvoid
devopvoid merged commit 902c370 into main Nov 2, 2026
24 of 25 checks passed
@devopvoid
devopvoid deleted the feat/reused-audio-sink-arrays branch November 2, 2026 21:32
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