summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2025-12-16 00:53:30 -0500
committerLLLL Colonq <llll@colonq>2025-12-16 00:53:30 -0500
commitada78e2ea079051604a4dc5ae682cc23f5afd0f0 (patch)
tree1f2df7da275f44f5be34be9fd17ed62bd7f3394a /crates
parentf0fc789a8ed6ef67605640ff25c7e470a421e5ec (diff)
Use set_target_at_time
Diffstat (limited to 'crates')
-rw-r--r--crates/teleia/src/audio.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/teleia/src/audio.rs b/crates/teleia/src/audio.rs
index 0988b64..974e5f7 100644
--- a/crates/teleia/src/audio.rs
+++ b/crates/teleia/src/audio.rs
@@ -32,7 +32,8 @@ impl AudioPlayingHandle {
}
pub fn fade_out(&self, ctx: &Context, time: f32) {
let t = ctx.audio.current_time() + time as f64;
- self.gain.gain().exponential_ramp_to_value_at_time(0.001, t).expect("failed to fade out audio");
+ self.gain.gain().set_target_at_time(0.0, ctx.audio.current_time(), time as f64)
+ .expect("failed to fade out audio");
self.node.stop_with_when(t).expect("failed to stop audio while fading out");
}
}