We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37ae1fe commit b07f4b9Copy full SHA for b07f4b9
src/param.rs
@@ -1088,11 +1088,11 @@ impl AudioParamProcessor {
1088
match some_event {
1089
None => {
1090
if is_a_rate {
1091
- let buffer = [self.intrinsic_value; RENDER_QUANTUM_SIZE];
1092
- // we don't use `buffer.remaining_capacity` to correctly handle
1093
- // the tests where `count` is lower than RENDER_QUANTUM_SIZE
1094
- let remaining = count - self.buffer.len();
1095
- let _ = self.buffer.try_extend_from_slice(&buffer[..remaining]);
+ // @todo(perf) - consider using try_extend_from_slice
+ // which internally uses ptr::copy_nonoverlapping
+ for _ in self.buffer.len()..count {
+ self.buffer.push(self.intrinsic_value);
+ }
1096
}
1097
break;
1098
0 commit comments