From e0e52953570caea66096cda08dc814f34735f7af Mon Sep 17 00:00:00 2001 From: steven-na Date: Wed, 5 Aug 2026 16:03:11 -0700 Subject: Fixed byte/element inconsistencies --- src/dft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dft.c') diff --git a/src/dft.c b/src/dft.c index 7b95518..7f90318 100644 --- a/src/dft.c +++ b/src/dft.c @@ -149,7 +149,7 @@ stft_data_t short_time_fourier_transform(smrt_arena_t *arena, u64 window_size, u assert(F64_EQ(round(log2(window_size)), log2(window_size), 1e-9) && "STFT input window_size must be a power of 2"); - sample_count = ALIGN_UP_POW2(sample_count, window_size); + sample_count = ALIGN_UP_POW2(sample_count * sizeof(f64), STFT_SAMPLE_ALIGN_BYTES(window_size)) / sizeof(f64); u64 segment_count = ((sample_count - window_size) / hop_size) + 1; -- cgit v1.2.3