From 24ab2892a0e98c6c0e69164dae321a141b63bc87 Mon Sep 17 00:00:00 2001 From: AlexanderARodin Date: Sun, 28 Jan 2024 03:54:38 +0300 Subject: [PATCH] rework part of AudioServer for TOML supporting --- Cargo.toml | 4 ++-- src/test_view.rs | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1a45856..2049845 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,8 +9,8 @@ edition = "2021" #raalog = { git = "https://github.com/AlexanderARodin/raalog.git", branch="dev" } raalog = { git = "https://github.com/AlexanderARodin/raalog.git", tag="v0.2.0" } -audio_server = { path = "../audio_server/" } -# audio_server = { git = "https://github.com/AlexanderARodin/audio_server.git", branch="main" } +# audio_server = { path = "../audio_server/" } +audio_server = { git = "https://github.com/AlexanderARodin/audio_server.git", branch="main" } egui = "0.24.0" eframe = { version = "0.24.0", default-features = false, features = [ diff --git a/src/test_view.rs b/src/test_view.rs index 4834627..aa52363 100644 --- a/src/test_view.rs +++ b/src/test_view.rs @@ -83,30 +83,33 @@ impl TestView { ui.horizontal( |ui| { let btnN = ui.button( "None" ); if btnN.clicked(){ - let setup = "[AudioSource]\nMain = 'None'"; + let setup = "[AudioSource]\nName = 'None'"; self.applySetup( setup, None ); } let btnS = ui.button( "SimpleSynth" ); if btnS.clicked(){ - let setup = "[AudioSource]\nMain = 'Simple'"; + let setup = "[AudioSource]\nName = 'Simple'"; self.applySetup( setup, None ); } let btnRA = ui.button( "RustySynt - Strings" ); if btnRA.clicked(){ - let setup = "[AudioSource]\nMain = 'RustySynth'"; + let setup = "[AudioSource]\nName = 'RustySynth'"; self.applySetup( setup, Some(SF_STRINGS) ); } let btnRB = ui.button( "RustySynt - Piano" ); if btnRB.clicked(){ - let setup = "[AudioSource]\nMain = 'RustySynth'"; + let setup = "[AudioSource]\nName = 'RustySynth'"; self.applySetup( setup, Some(SF_PIANO) ); } + let btnRA = ui.button( "Sequencer:Simple" ); + if btnRA.clicked(){ + let setup = "[AudioSource]\nName = 'Sequencer'\n[AudioSource.Sequencer]\nMainVoice = 'Simple'"; + self.applySetup( setup, None ); + } let btnRA = ui.button( "Sequencer:RustySynt - Strings" ); if btnRA.clicked(){ - let setup = "[AudioSource]\nMain = 'Sequencer'"; - self.applySetup( setup, Some(SF_PIANO) ); - //self.applySetup( setup, Some(SF_STRINGS) ); - //self.applySetup( "Sequencer:RustySynt", Some(SF_STRINGS) ); + let setup = "[AudioSource]\nName = 'Sequencer'\n[AudioSource.Sequencer]\nMainVoice = 'RustySynth'"; + self.applySetup( setup, Some(SF_STRINGS) ); } }); ui.separator();