Enable the standalone for gain_gui_egui
This commit is contained in:
parent
16010c076c
commit
eb11da731d
|
@ -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"
|
||||||
|
|
|
@ -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"]
|
||||||
|
|
7
plugins/examples/gain_gui_egui/src/main.rs
Normal file
7
plugins/examples/gain_gui_egui/src/main.rs
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
use nih_plug::prelude::*;
|
||||||
|
|
||||||
|
use gain_gui_egui::Gain;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
nih_export_standalone::<Gain>();
|
||||||
|
}
|
Loading…
Reference in a new issue