From efff43df21c7f9b4f0a9388c3ec3c05fdf463fb5 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Mon, 30 Jan 2023 02:15:12 +0100 Subject: [PATCH] Add an StftHelper::max_padding() --- src/util/stft.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/util/stft.rs b/src/util/stft.rs index 231baa2c..61061e2c 100644 --- a/src/util/stft.rs +++ b/src/util/stft.rs @@ -242,11 +242,16 @@ impl StftHelper { self.main_input_ring_buffers.len() } - /// The maximum block size supported by this `StftHelper`. + /// The maximum block size supported by this instance. pub fn max_block_size(&self) -> usize { self.main_input_ring_buffers.capacity() } + /// The maximum amount of padding supported by this instance. + pub fn max_padding(&self) -> usize { + self.padding_buffers[0].capacity() + } + /// The amount of latency introduced when processing audio through this [`StftHelper`]. pub fn latency_samples(&self) -> u32 { self.main_input_ring_buffers[0].len() as u32