WIP: fix VST3 version
This commit is contained in:
@@ -83,15 +83,19 @@ impl App {
|
||||
let variables = Arc::new(ArcSwap::from_pointee(HashMap::new()));
|
||||
let dict = Arc::new(Mutex::new(HashMap::new()));
|
||||
let rng = Arc::new(Mutex::new(StdRng::seed_from_u64(0)));
|
||||
Self::build(variables, dict, rng)
|
||||
Self::build(variables, dict, rng, false)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn with_shared(variables: Variables, dict: Dictionary, rng: Rng) -> Self {
|
||||
Self::build(variables, dict, rng)
|
||||
Self::build(variables, dict, rng, false)
|
||||
}
|
||||
|
||||
fn build(variables: Variables, dict: Dictionary, rng: Rng) -> Self {
|
||||
pub fn new_plugin(variables: Variables, dict: Dictionary, rng: Rng) -> Self {
|
||||
Self::build(variables, dict, rng, true)
|
||||
}
|
||||
|
||||
fn build(variables: Variables, dict: Dictionary, rng: Rng, plugin_mode: bool) -> Self {
|
||||
let script_engine =
|
||||
ScriptEngine::new(Arc::clone(&variables), Arc::clone(&dict), Arc::clone(&rng));
|
||||
let live_keys = Arc::new(LiveKeyState::new());
|
||||
@@ -119,11 +123,15 @@ impl App {
|
||||
|
||||
undo: UndoHistory::default(),
|
||||
|
||||
audio: AudioSettings::default(),
|
||||
audio: if plugin_mode {
|
||||
AudioSettings::new_plugin()
|
||||
} else {
|
||||
AudioSettings::default()
|
||||
},
|
||||
options: OptionsState::default(),
|
||||
panel: PanelState::default(),
|
||||
midi: MidiState::new(),
|
||||
plugin_mode: false,
|
||||
plugin_mode,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user