sirjuddington / SLADE

It's a Doom editor
https://slade.mancubus.net
GNU General Public License v2.0
686 stars 104 forks source link

Audio samples converted to 8 bits out of range #1562

Closed jendalinda closed 8 months ago

jendalinda commented 10 months ago

Audio samples converted to 8 bits may exceed the 0...255 range. The issue is caused by adding or subtracting 1 in attempt to round the values. Please add a check to limit the output sample values.

https://github.com/sirjuddington/SLADE/blob/fb10ce945040b4e1bfe03ec3bbb421df0888af52/src/MainEditor/Conversions.cpp#L174