Skip to content

fix: eliminate unnecessary buffer allocations during audio playback#2715

Merged
Danielku15 merged 1 commit into
developfrom
feature/android-audio-gc
May 25, 2026
Merged

fix: eliminate unnecessary buffer allocations during audio playback#2715
Danielku15 merged 1 commit into
developfrom
feature/android-audio-gc

Conversation

@Danielku15
Copy link
Copy Markdown
Member

Issues

Fixes #2714

Proposed changes

  1. Avoid unnecessary Float array allocations during playback in C# and Kotlni
  2. Write full buffer to AudioTrack to avoid looping and buffer requests when input buffer is drained.
  3. Follow up on 2: update position tracking to account for "silence" in edge cases.

Checklist

  • I consent that this change becomes part of alphaTab under it's current or any future open source license
  • Changes are implemented
  • New tests were added

Further details

  • This is a breaking change
  • This change will require update of the documentation/website

@Danielku15 Danielku15 self-assigned this May 25, 2026
@Danielku15 Danielku15 merged commit 2d456f0 into develop May 25, 2026
5 checks passed
@Danielku15 Danielku15 deleted the feature/android-audio-gc branch May 25, 2026 12:44
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.

AudioTrack underrun deadlock on Android causes infinite CPU spin and GC storm when playback finishes

1 participant