Skip to content

Commit 7db8faa

Browse files
committed
Fix bug in mdct atom construction
1 parent 8610ecb commit 7db8faa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mdct.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ def atom(self,N,id):
206206
win[:K/2] = 0
207207
win[K/2:K] = 1
208208
elif frame == P-1:
209-
win[K:3*K/4] = 1
210-
win[3*K/4:] = 0
209+
win[K:3*K/2] = 1
210+
win[3*K/2:] = 0
211211
# the signal array containing the atom
212212
x = np.zeros(N+K)
213213
x[frame*K:frame*K+L] = np.sqrt(2/K) * np.cos(2*np.pi/L * (f+1/2) * (np.arange(L) + (K + 1)/2)) * win

0 commit comments

Comments
 (0)