mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
remove some allocations from process callback
This commit is contained in:
parent
2e26fc2eaa
commit
e83802e1fd
3 changed files with 109 additions and 113 deletions
|
|
@ -68,12 +68,7 @@ impl Phrase {
|
|||
}
|
||||
LiveEvent::Midi { channel, message }.write(&mut buf).unwrap();
|
||||
let t = *time as usize;
|
||||
if output[t].is_none() {
|
||||
output[t] = Some(vec![]);
|
||||
}
|
||||
if let Some(Some(frame)) = output.get_mut(t) {
|
||||
frame.push(buf);
|
||||
}
|
||||
output[t].push(buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue