Skip to content

Commit 18b3137

Browse files
committed
AudioParam setValueAtTime rounding of end time
1 parent 9a365d4 commit 18b3137

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/param.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ impl AudioParamProcessor {
10601060

10611061
// fill buffer with current intrinsic value until `event.time`
10621062
if infos.is_a_rate {
1063-
let end_index = ((time - infos.block_time).max(0.) / infos.dt) as usize;
1063+
let end_index = ((time - infos.block_time).max(0.) / infos.dt).round() as usize;
10641064
let end_index_clipped = end_index.min(infos.count);
10651065

10661066
for _ in self.buffer.len()..end_index_clipped {

0 commit comments

Comments
 (0)