nvda
830e02f0 - Fix silence detection default threshold (#18649)

Commit
156 days ago
Fix silence detection default threshold (#18649) Fixes #18003. Summary of the issue: The default threshold values for signed integer types are incorrect, becoming twice as large, causing more parts to be trimmed than expected. Description of user facing changes: The excessive trimming will be fixed. Description of developer facing changes: None. Description of development approach: WaveFormat::defaultThreshold should use 1 / 2^10 or 0.0009765625 as the threshold value for all types. The current implementation handles floating points and unsigned integers correctly, but fails to differentiate the signedness, so signed integer types will have a threshold value that's twice as large. The solution is to replace the case-by-case implementation to a more general and correct max() / (1 << 10).
Author
Parents
Loading