1
0
Fork 0

Enable the standalone for gain_gui_egui

This commit is contained in:
Robbert van der Helm 2022-09-21 16:11:17 +02:00
parent 16010c076c
commit eb11da731d
3 changed files with 12 additions and 4 deletions

View file

@ -8,10 +8,11 @@ license = "ISC"
description = "A simple gain plugin with an egui GUI" description = "A simple gain plugin with an egui GUI"
[lib] [lib]
crate-type = ["cdylib"] # The `lib` artifact is needed for the standalone target
crate-type = ["cdylib", "lib"]
[dependencies] [dependencies]
nih_plug = { path = "../../../", features = ["assert_process_allocs"] } nih_plug = { path = "../../../", features = ["standalone"] }
nih_plug_egui = { path = "../../../nih_plug_egui" } nih_plug_egui = { path = "../../../nih_plug_egui" }
atomic_float = "0.1" atomic_float = "0.1"

View file

@ -7,7 +7,7 @@ use std::sync::Arc;
const PEAK_METER_DECAY_MS: f64 = 150.0; const PEAK_METER_DECAY_MS: f64 = 150.0;
/// This is mostly identical to the gain example, minus some fluff, and with a GUI. /// This is mostly identical to the gain example, minus some fluff, and with a GUI.
struct Gain { pub struct Gain {
params: Arc<GainParams>, params: Arc<GainParams>,
/// Needed to normalize the peak meter's response based on the sample rate. /// Needed to normalize the peak meter's response based on the sample rate.
@ -21,7 +21,7 @@ struct Gain {
} }
#[derive(Params)] #[derive(Params)]
struct GainParams { pub struct GainParams {
/// The editor state, saved together with the parameter state so the custom scaling can be /// The editor state, saved together with the parameter state so the custom scaling can be
/// restored. /// restored.
#[persist = "editor-state"] #[persist = "editor-state"]

View file

@ -0,0 +1,7 @@
use nih_plug::prelude::*;
use gain_gui_egui::Gain;
fn main() {
nih_export_standalone::<Gain>();
}