refactors and cleanups

This commit is contained in:
🪞👃🪞 2024-07-10 21:53:38 +03:00
parent 78afaf9693
commit 6979fd67ec
8 changed files with 126 additions and 173 deletions

View file

@ -73,12 +73,12 @@ pub struct App {
}
impl App {
pub fn new () -> Usually<Self> {
pub fn new (project: &str) -> Usually<Self> {
let xdg = Arc::new(microxdg::XdgApp::new("tek")?);
let first_run = crate::config::AppPaths::new(&xdg)?.should_create();
let jack = JackClient::Inactive(Client::new("tek", ClientOptions::NO_START_SERVER)?.0);
let transport = jack.transport();
Ok(Self {
let mut app = Self {
arranger_mode: false,
audio_outs: vec![],
chain_mode: false,
@ -106,7 +106,9 @@ impl App {
tracks: vec![],
transport: Some(transport),
xdg: Some(xdg),
})
};
app.load_edn(project)?;
Ok(app)
}
}