#8131 closed patch
ALL: Fix for possible mixer distortion
Reported by: | eriktorbjorn | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | Audio |
Version: | Keywords: | ||
Cc: | Game: |
Description
It looks to me as if there is a potential for arithmetic overflow in the mixer with some of the channel types. In reality I've only managed to provoke a few popping sounds when cranking up all the volume controls to their maximum setting, but I still think it'd be safer to use clamped_add_16() than to just add the sample to the buffer and assume it will work.
Ticket imported from: #639931. Ticket imported from: patches/236.
Attachments (1)
Change History (4)
by , 22 years ago
Attachment: | mixer.diff added |
---|
comment:1 by , 22 years ago
Owner: | set to |
---|---|
Status: | new → closed |
comment:2 by , 22 years ago
Done.
BTW, the clamp_add_16 function is quite crude, it cuts of "hard", a better implemention would do it slightly "smoothed", in order to reduce artifacts a little.
comment:3 by , 6 years ago
Component: | → Audio |
---|
Note:
See TracTickets
for help on using tickets.
Patch against a November 17 CVS snapshot