From f4c51a7e8e684aebc2a3fc931dd478e8b024d1a2 Mon Sep 17 00:00:00 2001 From: zymon Date: Tue, 29 Aug 2023 18:57:21 +0200 Subject: [PATCH] bugfix --- src/STFT.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/STFT.jl b/src/STFT.jl index 0c2d915..e7bd0d7 100644 --- a/src/STFT.jl +++ b/src/STFT.jl @@ -5,8 +5,8 @@ using FFTW export stft, istft -_fft(x::AbstractMatrix{<:Real}, d) = rfft(x, d) -_fft(x::AbstractMatrix{<:Complex}, d) = fft(x, d) +_fft(x::AbstractArray{<:Real}, d) = rfft(x, d) +_fft(x::AbstractArray{<:Complex}, d) = fft(x, d) @@ -100,7 +100,8 @@ function analysis( L::I = zero(I), N::I = length(w); )::Matrix{T |> complex} where {T<:Number, I<:Integer, V<:AbstractVector{T}} - analysis((@view x[:,:]), w, L, N) + xx = @view x[:,:] + @view analysis(xx, w, L, N)[:, :, 1] end function analysis(