Export the standalone target for gain_gui_vizia
This commit is contained in:
parent
f3db4a9ed0
commit
96ec1da037
|
@ -8,10 +8,11 @@ license = "ISC"
|
||||||
description = "A simple gain plugin with an vizia GUI"
|
description = "A simple gain plugin with an vizia 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 = ["assert_process_allocs", "standalone"] }
|
||||||
nih_plug_vizia = { path = "../../../nih_plug_vizia" }
|
nih_plug_vizia = { path = "../../../nih_plug_vizia" }
|
||||||
|
|
||||||
atomic_float = "0.1"
|
atomic_float = "0.1"
|
||||||
|
|
|
@ -6,7 +6,7 @@ use std::sync::Arc;
|
||||||
mod editor;
|
mod editor;
|
||||||
|
|
||||||
/// 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>,
|
||||||
editor_state: Arc<ViziaState>,
|
editor_state: Arc<ViziaState>,
|
||||||
|
|
||||||
|
|
7
plugins/examples/gain_gui_vizia/src/main.rs
Normal file
7
plugins/examples/gain_gui_vizia/src/main.rs
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
use nih_plug::prelude::*;
|
||||||
|
|
||||||
|
use gain_gui_vizia::Gain;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
nih_export_standalone::<Gain>();
|
||||||
|
}
|
|
@ -8,8 +8,31 @@ mod wrapper;
|
||||||
|
|
||||||
/// Open an NIH-plug plugin as a standalone application. If the plugin has an editor, this will open
|
/// Open an NIH-plug plugin as a standalone application. If the plugin has an editor, this will open
|
||||||
/// the editor and block until the editor is closed. Otherwise this will block until SIGINT is
|
/// the editor and block until the editor is closed. Otherwise this will block until SIGINT is
|
||||||
/// received. This is mainly useful for quickly testing plugin GUIs. You should call this function
|
/// received. This is mainly useful for quickly testing plugin GUIs. In order to use this, you will
|
||||||
/// from a `main()` function.
|
/// first need to make your plugin's main struct `pub` and expose a `lib` artifact in addition to
|
||||||
|
/// your plugin's `cdylib`:
|
||||||
|
///
|
||||||
|
/// ```toml
|
||||||
|
/// # Cargo.toml
|
||||||
|
///
|
||||||
|
/// [lib]
|
||||||
|
/// # The `lib` artifact is needed for the standalone target
|
||||||
|
/// crate-type = ["cdylib", "lib"]
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// You can then create a `src/main.rs` file that calls this function:
|
||||||
|
///
|
||||||
|
/// ```ignore
|
||||||
|
/// // src/main.rs
|
||||||
|
///
|
||||||
|
/// use plugin_name::prelude::*;
|
||||||
|
///
|
||||||
|
/// use plugin_name::PluginName;
|
||||||
|
///
|
||||||
|
/// fn main() {
|
||||||
|
/// nih_export_standalone::<PluginName>();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
///
|
///
|
||||||
/// By default this will connect to the 'default' audio and MIDI ports. Use the command line options
|
/// By default this will connect to the 'default' audio and MIDI ports. Use the command line options
|
||||||
/// to change this. `--help` lists all available options.
|
/// to change this. `--help` lists all available options.
|
||||||
|
|
Loading…
Reference in a new issue