mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
wip: providing content chunks with ednprovider
This commit is contained in:
parent
1ff35baea9
commit
8c54f8e426
8 changed files with 157 additions and 41 deletions
18
midi/examples/midi-import.rs
Normal file
18
midi/examples/midi-import.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
use tek::*;
|
||||
|
||||
struct ExampleClips(Vec<Arc<RwLock<Clip>>>);
|
||||
|
||||
impl HasClips for ExampleClips {
|
||||
fn phrases (&self) -> &Vec<Arc<RwLock<Clip>>> {
|
||||
&self.0
|
||||
}
|
||||
fn phrases_mut (&mut self) -> &mut Vec<Arc<RwLock<Clip>>> {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
|
||||
fn main () -> Usually<()> {
|
||||
let mut phrases = ExampleClips(vec![]);
|
||||
PoolClipCommand::Import(0, String::from("./example.mid")).execute(&mut phrases)?;
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue