Skip to content
This repository was archived by the owner on Feb 21, 2026. It is now read-only.

Reuse tmp buffers in calls to PCMBuffer to avoid allocations#44

Open
dweymouth wants to merge 1 commit into
go-audio:masterfrom
dweymouth:pcmbuffer-noallocate
Open

Reuse tmp buffers in calls to PCMBuffer to avoid allocations#44
dweymouth wants to merge 1 commit into
go-audio:masterfrom
dweymouth:pcmbuffer-noallocate

Conversation

@dweymouth

Copy link
Copy Markdown

This change caches and re-uses the tmp read buffer and the sample buffer on the decoder struct, to avoid allocating memory on every call to PCMBuffer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant