mirror of
https://github.com/storytold/soundcraft.git
synced 2026-11-07 02:41:57 +00:00
Playback: an infinite sample goes out as silence, not full scale
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ad7b9bcac6
commit
0888ca8ac3
1 file changed
+1
-2
@@ -399,8 +399,7 @@ impl AudioState {
|
||||
|
||||
/// Clamp to the device range, mapping NaN and infinities to silence.
|
||||
fn out_sample(v: f32) -> f32 {
|
||||
let v = v.clamp(-1.0, 1.0);
|
||||
if v.is_finite() { v } else { 0.0 }
|
||||
if v.is_finite() { v.clamp(-1.0, 1.0) } else { 0.0 }
|
||||
}
|
||||
|
||||
/// UI-thread bookkeeping of the third-party instances the audio thread holds.
|
||||
|
||||
Reference in new issue
Block a user