Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver: remove sample buffer copy for softclip #143

Merged
merged 2 commits into from
Dec 15, 2022

Conversation

FelixMcFelix
Copy link
Member

This PR makes use of SampleBuffer::samples_mut to remove a 7680B stack allocation in general, and memcopy when softclip is used. This appears to offer ~1.5% performance boost according to cargo make bench.

This is a draft PR conditioned on the relevant symphonia API change becoming available.

@FelixMcFelix FelixMcFelix added enhancement New feature or request driver Relates to the driver or one of its sub-tasks. fix Fixes a bug or error labels Aug 1, 2022
FelixMcFelix added a commit to FelixMcFelix/songbird that referenced this pull request Dec 15, 2022
Temporary measure until symphonia 0.5.2 is released. Should allow us to merge serenity-rs#143 now that all our API additions and fixes are in.
FelixMcFelix added a commit that referenced this pull request Dec 15, 2022
Temporary measure until symphonia 0.5.2 is released. Should allow us to merge #143 now that all our API additions and fixes are in.
@FelixMcFelix FelixMcFelix marked this pull request as ready for review December 15, 2022 19:17
@FelixMcFelix FelixMcFelix merged commit 1594c4e into serenity-rs:next Dec 15, 2022
@FelixMcFelix FelixMcFelix deleted the samples_mut_remove_copy branch March 2, 2023 22:32
FelixMcFelix added a commit to FelixMcFelix/songbird that referenced this pull request Nov 20, 2023
Temporary measure until symphonia 0.5.2 is released. Should allow us to merge serenity-rs#143 now that all our API additions and fixes are in.
FelixMcFelix added a commit to FelixMcFelix/songbird that referenced this pull request Nov 20, 2023
This PR makes use of `SampleBuffer::samples_mut` to remove a 7680B stack allocation in general, and memcopy when softclip is used. This appears to offer ~1.5% performance boost according to `cargo make bench`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
driver Relates to the driver or one of its sub-tasks. enhancement New feature or request fix Fixes a bug or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant