Skip to content

Conversation

@will3942
Copy link
Contributor

@will3942 will3942 commented Jan 17, 2025

Fixes #680

This avoids any potential clipping/overflow.

As ChannelVolume deals with Samples in the same format they come in as (e.g. i16), previously just using .saturating_add() to sum all the samples would mean that the sum would be clipped/overflow if the signals were large enough. By averaging the Samples we avoid this overflow.

@yara-blue yara-blue merged commit bc5c4eb into RustAudio:master Jan 18, 2025
11 checks passed
@yara-blue
Copy link
Member

thank you very much, elegant solution using amplify there 👍

yara-blue pushed a commit that referenced this pull request Jan 18, 2025
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.

ChannelVolume usage causes crackling/distortion

2 participants