From 20414d4b6ab6d1177d8008ee987931c9e4ee65d3 Mon Sep 17 00:00:00 2001 From: ozpv <39195175+ozpv@users.noreply.github.com> Date: Mon, 18 May 2026 01:58:17 -0500 Subject: a few updates --- src/window_size.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/window_size.rs') diff --git a/src/window_size.rs b/src/window_size.rs index bfc3957..620a307 100644 --- a/src/window_size.rs +++ b/src/window_size.rs @@ -1,8 +1,8 @@ /// The max value of the custom window size is `u32::MAX`. +/// The min value of the custom window size is `WindowSize::Size256`. /// This is because it's the maximum latency one can report to a CLAP host. #[derive(Debug, PartialEq)] pub enum WindowSize { - Size128, Size256, Size512, Size1024, @@ -16,10 +16,9 @@ pub enum WindowSize { impl From for WindowSize { fn from(item: usize) -> Self { - let item = item.clamp(0, u32::MAX as usize); + let item = item.clamp(256, u32::MAX as usize); match item { - 128 => Self::Size128, 256 => Self::Size256, 512 => Self::Size512, 1024 => Self::Size1024, @@ -36,7 +35,6 @@ impl From for WindowSize { impl WindowSize { pub fn as_str(&self) -> &'static str { match self { - Self::Size128 => "128", Self::Size256 => "256", Self::Size512 => "512", Self::Size1024 => "1024", @@ -51,7 +49,6 @@ impl WindowSize { pub fn inner(&self) -> usize { match self { - Self::Size128 => 128, Self::Size256 => 256, Self::Size512 => 512, Self::Size1024 => 1024, @@ -66,7 +63,6 @@ impl WindowSize { pub fn iter() -> impl Iterator { [ - Self::Size128, Self::Size256, Self::Size512, Self::Size1024, -- cgit v1.2.3