mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
refactor audio.rs
This commit is contained in:
parent
5fab1af138
commit
7f255eaea8
4 changed files with 88 additions and 68 deletions
|
|
@ -52,3 +52,27 @@ impl Sample {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO:
|
||||
//for port in midi_in.iter() {
|
||||
//for event in port.iter() {
|
||||
//match event {
|
||||
//(time, Ok(LiveEvent::Midi {message, ..})) => match message {
|
||||
//MidiMessage::NoteOn {ref key, ..} if let Some(editor) = self.editor.as_ref() => {
|
||||
//editor.set_note_pos(key.as_int() as usize);
|
||||
//},
|
||||
//MidiMessage::Controller {controller, value} if let (Some(editor), Some(sampler)) = (
|
||||
//self.editor.as_ref(),
|
||||
//self.sampler.as_ref(),
|
||||
//) => {
|
||||
//// TODO: give sampler its own cursor
|
||||
//if let Some(sample) = &sampler.mapped[editor.note_pos()] {
|
||||
//sample.write().unwrap().handle_cc(*controller, *value)
|
||||
//}
|
||||
//}
|
||||
//_ =>{}
|
||||
//},
|
||||
//_ =>{}
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue