aboutsummaryrefslogtreecommitdiff
path: root/hid-tminit
diff options
context:
space:
mode:
authorKai Krakow <kai@kaishome.de>2026-08-08 13:04:25 +0200
committerKai Krakow <kai@kaishome.de>2026-08-09 00:20:18 +0200
commit1914c478dec801e98e9b73bbfd5bbdc4c0a11cf8 (patch)
tree5919cc080efdc3302c43304d6bcf17ea1410eb00 /hid-tminit
parent465ce84d2997e5af6630b88d88b63509d5a88031 (diff)
downloadhid-tmff2-1914c478dec801e98e9b73bbfd5bbdc4c0a11cf8.tar.gz
hid-tmff2-1914c478dec801e98e9b73bbfd5bbdc4c0a11cf8.zip
handle full signed effect magnitude range
+ Direction scaling can produce 32768 for the valid input pair -32768 and a negative full-scale sine value. Storing the intermediate result in s16 wraps it before constant, ramp or periodic effects are converted. + Keep direction-scaled values in s32 until their destination range is known. Periodic effects cannot represent a magnitude above S16_MAX, so clamp the asymmetric endpoint after making the magnitude positive. This also prevents the following headroom calculation from using a negative wrapped magnitude.
Diffstat (limited to 'hid-tminit')
0 files changed, 0 insertions, 0 deletions