change Device from trait to enum

This commit is contained in:
🪞👃🪞 2025-04-24 22:30:43 +03:00
parent 866d88c8ec
commit 1cc3a58826
8 changed files with 150 additions and 92 deletions

View file

@ -20,7 +20,8 @@ pub trait MidiPlaybackApi: HasPlayClip + HasClock + HasMidiOuts {
fn clear (
&mut self, scope: &ProcessScope, out: &mut [Vec<Vec<u8>>], reset: bool
) {
for frame in &mut out[0..scope.n_frames() as usize] {
let n_frames = (scope.n_frames() as usize).min(out.len());
for frame in &mut out[0..n_frames] {
frame.clear();
}
if reset {