1
0
Fork 0

Compare commits

..

7 commits

Author SHA1 Message Date
Alex Janka 5fb5bcd018 raw-window-handle 0.6.0 2024-08-19 15:16:40 +10:00
Robbert van der Helm dfafe90349 Update dependencies 2024-08-18 21:45:01 +02:00
Robbert van der Helm 2b8d012f9f Fix usage of deprecated function 2024-08-18 21:44:40 +02:00
Robbert van der Helm 3697d72213 Fix assert_process_allocs with mingw
Not quite sure how this happened.
2024-08-18 21:43:53 +02:00
Robbert van der Helm 34ebda258f Bump the macOS GitHub Actions runners
MacOS 11 is no longer supported.
2024-08-18 21:39:55 +02:00
Robbert van der Helm 61c79ab610 Swap out lazy_static for std::sync::LazyLock 2024-08-18 21:37:10 +02:00
Robbert van der Helm 31711785e6 Update standalone baseview version 2024-08-18 21:26:23 +02:00
12 changed files with 773 additions and 665 deletions
.github/workflows
CHANGELOG.mdCargo.lockCargo.toml
nih_plug_egui
nih_plug_iced
nih_plug_vizia
src

View file

@ -22,7 +22,7 @@ jobs:
matrix: matrix:
include: include:
- { name: ubuntu-20.04, os: ubuntu-20.04, cross-target: '' } - { name: ubuntu-20.04, os: ubuntu-20.04, cross-target: '' }
- { name: macos-universal, os: macos-11, cross-target: aarch64-apple-darwin } - { name: macos-universal, os: macos-12, cross-target: aarch64-apple-darwin }
- { name: windows, os: windows-latest, cross-target: '' } - { name: windows, os: windows-latest, cross-target: '' }
name: Package plugin binaries name: Package plugin binaries
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}

View file

@ -15,7 +15,7 @@ jobs:
test: test:
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04, macos-11, windows-latest] os: [ubuntu-20.04, macos-12, windows-latest]
name: Build and test all components name: Build and test all components
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -10,6 +10,13 @@ Since there is no stable release yet, the changes are organized per day in
reverse chronological order. The main purpose of this document in its current reverse chronological order. The main purpose of this document in its current
state is to list breaking changes. state is to list breaking changes.
## [2024-08-18]
### Breaking changes
- The minimum supported Rust version has been bumped to 1.80 to replace the last
uses of `lazy_static` with `std::sync::LazyLock`.
## [2024-05-05] ## [2024-05-05]
### Breaking changes ### Breaking changes

1380
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
name = "nih_plug" name = "nih_plug"
version = "0.0.0" version = "0.0.0"
edition = "2021" edition = "2021"
rust-version = "1.70" rust-version = "1.80"
authors = ["Robbert van der Helm <mail@robbertvanderhelm.nl>"] authors = ["Robbert van der Helm <mail@robbertvanderhelm.nl>"]
license = "ISC" license = "ISC"
@ -92,7 +92,6 @@ cfg-if = "1.0"
# This supports CLAP 1.1.8 # This supports CLAP 1.1.8
clap-sys = { git = "https://github.com/robbert-vdh/clap-sys.git", branch = "feature/cstr-macro" } clap-sys = { git = "https://github.com/robbert-vdh/clap-sys.git", branch = "feature/cstr-macro" }
crossbeam = "0.8" crossbeam = "0.8"
lazy_static = "1.4"
log = { version = "0.4", features = ["std", "release_max_level_info"] } log = { version = "0.4", features = ["std", "release_max_level_info"] }
midi-consts = "0.1" midi-consts = "0.1"
nih_log = "0.3.1" nih_log = "0.3.1"
@ -111,7 +110,7 @@ assert_no_alloc = { git = "https://github.com/robbert-vdh/rust-assert-no-alloc.g
# Used for the `standalone` feature # Used for the `standalone` feature
# NOTE: OpenGL support is not needed here, but rust-analyzer gets confused when # NOTE: OpenGL support is not needed here, but rust-analyzer gets confused when
# some crates do use it and others don't # some crates do use it and others don't
baseview = { git = "https://github.com/RustAudio/baseview.git", features = [ baseview = { git = "https://git.alexjanka.com/alex/baseview", rev = "e31a11f1c73c0fdf1463db77105cf9a9b7c9240a", features = [
"opengl", "opengl",
], optional = true } ], optional = true }
# All the claps! # All the claps!

View file

@ -17,11 +17,10 @@ rayon = ["egui-baseview/rayon"]
[dependencies] [dependencies]
nih_plug = { path = "..", default-features = false } nih_plug = { path = "..", default-features = false }
raw-window-handle = "0.5" raw-window-handle = "0.6.2"
baseview = { git = "https://github.com/RustAudio/baseview.git", rev = "45465c5f46abed6c6ce370fffde5edc8e4cd5aa3" } baseview = { git = "https://git.alexjanka.com/alex/baseview", rev = "e31a11f1c73c0fdf1463db77105cf9a9b7c9240a" }
crossbeam = "0.8" crossbeam = "0.8"
egui-baseview = { git = "https://github.com/BillyDM/egui-baseview.git", rev = "68c4d0e8e5c1c702a888a245f4ac50eddfdfcaed", default-features = false } egui-baseview = { git = "https://github.com/BillyDM/egui-baseview.git", rev = "68c4d0e8e5c1c702a888a245f4ac50eddfdfcaed", default-features = false }
lazy_static = "1.4"
parking_lot = "0.12" parking_lot = "0.12"
# To make the state persistable # To make the state persistable
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }

View file

@ -1,10 +1,9 @@
use std::sync::Arc; use std::sync::{Arc, LazyLock};
use egui_baseview::egui::{ use egui_baseview::egui::{
self, emath, vec2, Key, Response, Sense, Stroke, TextEdit, TextStyle, Ui, Vec2, Widget, self, emath, vec2, Key, Response, Sense, Stroke, TextEdit, TextStyle, Ui, Vec2, Widget,
WidgetText, WidgetText,
}; };
use lazy_static::lazy_static;
use nih_plug::prelude::{Param, ParamSetter}; use nih_plug::prelude::{Param, ParamSetter};
use parking_lot::Mutex; use parking_lot::Mutex;
@ -14,11 +13,10 @@ use super::util;
/// noramlized parameter. /// noramlized parameter.
const GRANULAR_DRAG_MULTIPLIER: f32 = 0.0015; const GRANULAR_DRAG_MULTIPLIER: f32 = 0.0015;
lazy_static! { static DRAG_NORMALIZED_START_VALUE_MEMORY_ID: LazyLock<egui::Id> =
static ref DRAG_NORMALIZED_START_VALUE_MEMORY_ID: egui::Id = egui::Id::new((file!(), 0)); LazyLock::new(|| egui::Id::new((file!(), 0)));
static ref DRAG_AMOUNT_MEMORY_ID: egui::Id = egui::Id::new((file!(), 1)); static DRAG_AMOUNT_MEMORY_ID: LazyLock<egui::Id> = LazyLock::new(|| egui::Id::new((file!(), 1)));
static ref VALUE_ENTRY_MEMORY_ID: egui::Id = egui::Id::new((file!(), 2)); static VALUE_ENTRY_MEMORY_ID: LazyLock<egui::Id> = LazyLock::new(|| egui::Id::new((file!(), 2)));
}
/// A slider widget similar to [`egui::widgets::Slider`] that knows about NIH-plug parameters ranges /// A slider widget similar to [`egui::widgets::Slider`] that knows about NIH-plug parameters ranges
/// and can get values for it. The slider supports double click and control click to reset, /// and can get values for it. The slider supports double click and control click to reset,
@ -212,7 +210,7 @@ impl<'a, P: Param> ParamSlider<'a, P> {
self.reset_param(); self.reset_param();
response.mark_changed(); response.mark_changed();
} }
if response.drag_released() { if response.drag_stopped() {
self.end_drag(); self.end_drag();
} }

View file

@ -61,10 +61,10 @@ nih_plug_assets = { git = "https://github.com/robbert-vdh/nih_plug_assets.git" }
# The currently targeted version of baseview uses a different version of # The currently targeted version of baseview uses a different version of
# `raw_window_handle` than NIH-plug, so we need to manually convert between them # `raw_window_handle` than NIH-plug, so we need to manually convert between them
raw-window-handle = "0.4" raw-window-handle = "0.6.2"
atomic_refcell = "0.1" atomic_refcell = "0.1"
baseview = { git = "https://github.com/RustAudio/baseview.git", rev = "1d9806d5bd92275d0d8142d9c9c90198757b9b25" } baseview = { git = "https://git.alexjanka.com/alex/baseview", rev = "e31a11f1c73c0fdf1463db77105cf9a9b7c9240a" }
crossbeam = "0.8" crossbeam = "0.8"
# This targets iced 0.4 # This targets iced 0.4
iced_baseview = { git = "https://github.com/robbert-vdh/iced_baseview.git", branch = "feature/update-baseview", default-features = false } iced_baseview = { git = "https://github.com/robbert-vdh/iced_baseview.git", branch = "feature/update-baseview", default-features = false }

View file

@ -11,10 +11,14 @@ description = "An adapter to use VIZIA GUIs with NIH-plug"
nih_plug = { path = "..", default-features = false } nih_plug = { path = "..", default-features = false }
nih_plug_assets = { git = "https://github.com/robbert-vdh/nih_plug_assets.git" } nih_plug_assets = { git = "https://github.com/robbert-vdh/nih_plug_assets.git" }
baseview = { git = "https://github.com/RustAudio/baseview.git", rev = "2c1b1a7b0fef1a29a5150a6a8f6fef6a0cbab8c4" } baseview = { git = "https://git.alexjanka.com/alex/baseview", rev = "e31a11f1c73c0fdf1463db77105cf9a9b7c9240a" }
# This contains an as of writing not yet merged patch for rounding errors when # This contains an as of writing not yet merged patch for rounding errors when
# resizing, and a workaround for certain events not firing when resizing # resizing, and a workaround for certain events not firing when resizing
vizia = { git = "https://github.com/robbert-vdh/vizia.git", tag = "patched-2024-05-06", default-features = false, features = ["baseview", "clipboard", "x11"] } vizia = { git = "https://github.com/robbert-vdh/vizia.git", tag = "patched-2024-05-06", default-features = false, features = [
"baseview",
"clipboard",
"x11",
] }
crossbeam = "0.8" crossbeam = "0.8"
# To make the state persistable # To make the state persistable

View file

@ -6,7 +6,7 @@
use anymap::Entry; use anymap::Entry;
use crossbeam::channel; use crossbeam::channel;
use parking_lot::Mutex; use parking_lot::Mutex;
use std::sync::{Arc, Weak}; use std::sync::{Arc, LazyLock, Weak};
use std::thread::{self, JoinHandle}; use std::thread::{self, JoinHandle};
use super::MainThreadExecutor; use super::MainThreadExecutor;
@ -73,10 +73,8 @@ where
// Rust does not allow us to use the `T` and `E` type variable in statics, so this is a // Rust does not allow us to use the `T` and `E` type variable in statics, so this is a
// workaround to have a singleton that also works if for whatever reason there arem ultiple `T` // workaround to have a singleton that also works if for whatever reason there arem ultiple `T`
// and `E`s in a single process (won't happen with normal plugin usage, but sho knwos). // and `E`s in a single process (won't happen with normal plugin usage, but sho knwos).
lazy_static::lazy_static! { static HANDLE_MAP: LazyLock<Mutex<anymap::Map<dyn std::any::Any + Send>>> =
static ref HANDLE_MAP: Mutex<anymap::Map<dyn std::any::Any + Send>> = LazyLock::new(|| Mutex::new(anymap::Map::new()));
Mutex::new(anymap::Map::new());
}
impl<T: Send + 'static, E: MainThreadExecutor<T> + 'static> WorkerThread<T, E> { impl<T: Send + 'static, E: MainThreadExecutor<T> + 'static> WorkerThread<T, E> {
fn spawn() -> Self { fn spawn() -> Self {

View file

@ -14,7 +14,6 @@ pub use clap_sys::factory::plugin_factory::{clap_plugin_factory, CLAP_PLUGIN_FAC
pub use clap_sys::host::clap_host; pub use clap_sys::host::clap_host;
pub use clap_sys::plugin::{clap_plugin, clap_plugin_descriptor}; pub use clap_sys::plugin::{clap_plugin, clap_plugin_descriptor};
pub use clap_sys::version::CLAP_VERSION; pub use clap_sys::version::CLAP_VERSION;
pub use lazy_static::lazy_static;
/// Export one or more CLAP plugins from this library using the provided plugin types. /// Export one or more CLAP plugins from this library using the provided plugin types.
#[macro_export] #[macro_export]

View file

@ -18,7 +18,7 @@ const AARCH64_FTZ_BIT: u64 = 1 << 24;
#[cfg(all( #[cfg(all(
debug_assertions, debug_assertions,
physical_sizefeature = "assert_process_allocs", feature = "assert_process_allocs",
all(windows, target_env = "gnu") all(windows, target_env = "gnu")
))] ))]
compile_error!("The 'assert_process_allocs' feature does not work correctly in combination with the 'x86_64-pc-windows-gnu' target, see https://github.com/Windfisch/rust-assert-no-alloc/issues/7"); compile_error!("The 'assert_process_allocs' feature does not work correctly in combination with the 'x86_64-pc-windows-gnu' target, see https://github.com/Windfisch/rust-assert-no-alloc/issues/7");