Mercurial > hg > may
changeset 504:1b981d57d90f redo_framer
Fix and tests for non-padded framer mode
author | Chris Cannam |
---|---|
date | Wed, 20 Nov 2013 10:14:08 +0000 |
parents | 28fb7e461b31 |
children | a470001a510b |
files | src/may/stream/framer.yeti src/may/stream/test/test_framer.yeti |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/may/stream/framer.yeti Wed Nov 20 08:22:11 2013 +0000 +++ b/src/may/stream/framer.yeti Wed Nov 20 10:14:08 2013 +0000 @@ -11,7 +11,6 @@ win = load may.signal.window; fft = load may.transform.fft; mat = load may.matrix; -ch = load may.stream.channels; complex = load may.complex; cm = load may.matrix.complex; manip = load may.stream.manipulate; @@ -69,7 +68,7 @@ mat.asRows (mat.concatHorizontal [mat.zeroMatrix { rows = stream.channels, columns = hop }, - stream.read framesize]); + stream.read (framesize - hop)]); fi; overlappingBlockList framesize hop stream framesize initialBuffer; fi;
--- a/src/may/stream/test/test_framer.yeti Wed Nov 20 08:22:11 2013 +0000 +++ b/src/may/stream/test/test_framer.yeti Wed Nov 20 10:14:08 2013 +0000 @@ -136,6 +136,14 @@ testFrames 3 [ Hop 2 ] 4 [ [0,1,2], [2,3,4], [4,0,0] ]; ), +"frames-4.3x4np": \( + testFrames 4 [ Hop 3, Padded false ] 4 [ [1,2,3,4], [4,0,0,0] ]; +), + +"frames-3.2x4np": \( + testFrames 3 [ Hop 2, Padded false ] 4 [ [1,2,3], [3,4,0], [0,0,0] ]; +), + "frames-3.1x6": \( testFramesInvertible 3 [ Hop 1 ] 6 [ [0,0,1], [0,1,2], [1,2,3], [2,3,4],