Remove clamping of float samples

This commit is contained in:
Roderick van Domburg 2021-09-01 20:55:28 +02:00
parent 7da4d0e473
commit d8e35bf0c4
No known key found for this signature in database
GPG key ID: FE2585E713F9F30A

View file

@ -1286,16 +1286,7 @@ impl PlayerInternal {
} }
} }
} }
*sample *= actual_normalisation_factor; *sample *= actual_normalisation_factor;
// Extremely sharp attacks, however unlikely, *may* still clip and provide
// undefined results, so strictly enforce output within [-1.0, 1.0].
if *sample < -1.0 {
*sample = -1.0;
} else if *sample > 1.0 {
*sample = 1.0;
}
} }
} }