mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
the definitions are unified alright. it's just not supported yet :D the idea being that tek offers to write out the default configs to ~/.config/tek-v0 where the user can customize them.
This commit is contained in:
parent
9e147cda69
commit
3c8616deba
43 changed files with 441 additions and 465 deletions
20
.old/midi_import.rs
Normal file
20
.old/midi_import.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
use tek::*;
|
||||
use tengri::input::*;
|
||||
use std::sync::*;
|
||||
struct ExampleClips(Arc<RwLock<Vec<Arc<RwLock<MidiClip>>>>>);
|
||||
impl HasClips for ExampleClips {
|
||||
fn clips (&self) -> RwLockReadGuard<'_, Vec<Arc<RwLock<MidiClip>>>> {
|
||||
self.0.read().unwrap()
|
||||
}
|
||||
fn clips_mut (&self) -> RwLockWriteGuard<'_, Vec<Arc<RwLock<MidiClip>>>> {
|
||||
self.0.write().unwrap()
|
||||
}
|
||||
}
|
||||
fn main () -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut clips = Pool::default();//ExampleClips(Arc::new(vec![].into()));
|
||||
PoolClipCommand::Import {
|
||||
index: 0,
|
||||
path: std::path::PathBuf::from("./example.mid")
|
||||
}.execute(&mut clips)?;
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue