From e939fa891b6403fcdaba7f545b2bf7932aa7f9ba Mon Sep 17 00:00:00 2001 From: steven-na Date: Wed, 5 Aug 2026 14:31:02 -0700 Subject: STFT rounds sample_count up to nearest window_size multiple --- src/dft.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/dft.h') diff --git a/src/dft.h b/src/dft.h index 74178aa..aaa2796 100644 --- a/src/dft.h +++ b/src/dft.h @@ -43,10 +43,12 @@ typedef struct { } stft_data_t; /// Run STFT algorithm on samples, sliding a window_size window by hop_size each step +/// Warning: This function assumes that samples' allocation is large enough to fit +/// ALIGN_UP_POW2(sample_count, window_size) elements. stft_data_t short_time_fourier_transform(smrt_arena_t * arena , u64 window_size , u64 hop_size , - f64 * samples , + f64 * samples , u64 sample_count , u64 sample_rate); -- cgit v1.2.3