Skip to content

Commit 4a5e4dc

Browse files
committed
doc: comment on using count
1 parent b07f4b9 commit 4a5e4dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/param.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,6 +1088,9 @@ impl AudioParamProcessor {
10881088
match some_event {
10891089
None => {
10901090
if is_a_rate {
1091+
// @note - we use `count` rather then `buffer.remaining_capacity`
1092+
// to correctly unit tests where `count` is lower than RENDER_QUANTUM_SIZE
1093+
//
10911094
// @todo(perf) - consider using try_extend_from_slice
10921095
// which internally uses ptr::copy_nonoverlapping
10931096
for _ in self.buffer.len()..count {

0 commit comments

Comments
 (0)