@d6 nope, simple sum like you've done is all there is to it. You might also first check for clipping before deciding to do the div by 2. If nothing clipped, then skip it.
Top-level
@d6 nope, simple sum like you've done is all there is to it. You might also first check for clipping before deciding to do the div by 2. If nothing clipped, then skip it. 2 comments
@d6 no I meant, scan the entire audio stream. If nothing clips, skip the div for the whole thing. Clamping just a few samples would distort the hell out of it, yeah. |
@hyc i don't think that approach is great because when you are near clipping you're unscaled then suddenly you drop down by 2 once you exceed the peak. i have seen people talk about clamping at the max value but in my test cases that sounds too distorted.
thanks for confirming my intuition about the sum!