# HG changeset patch # User Chris Cannam # Date 1369932445 -3600 # Node ID 6ed6af2fc7943fe5b240bdb695a7e36a39377e8b # Parent be39f21456a150cce79c5d21e6b3b8a123fb0900 Further test diff -r be39f21456a1 -r 6ed6af2fc794 yetilab/stream/framer.yeti --- a/yetilab/stream/framer.yeti Thu May 30 17:34:35 2013 +0100 +++ b/yetilab/stream/framer.yeti Thu May 30 17:47:25 2013 +0100 @@ -114,7 +114,7 @@ var position = 0; w = win.windowFunction (Hann ()) [ Symmetric true ] framesize; channels = mat.height (head frames); // so we don't need to keep a head ptr - filt.delayedBy (- (framesize - hop)) + filt.delayedBy (- framesize) { get position () = position, get channels () = channels, @@ -143,6 +143,7 @@ (framesFor count [buffered]); // println "source = \(source)"; toReturn = mat.columnSlice source 0 count; + position := position + mat.width toReturn; buffered := mat.columnSlice source count (mat.width source); toReturn), close = \(), diff -r be39f21456a1 -r 6ed6af2fc794 yetilab/stream/test/test_framer.yeti --- a/yetilab/stream/test/test_framer.yeti Thu May 30 17:34:35 2013 +0100 +++ b/yetilab/stream/test/test_framer.yeti Thu May 30 17:47:25 2013 +0100 @@ -109,7 +109,7 @@ [3,4,5], [4,5,6], [5,6,0], [6,0,0] ]; ), -"overlapAdd": \( +"overlapAdd-3.1": \( compareUsing (mat.equal) (fr.overlapAdd 1 3 1 [ mat.newRowVector (vec.fromList [ 1,2,3 ]), mat.newRowVector (vec.fromList [ 4,5,6 ]), @@ -117,6 +117,14 @@ (mat.newRowVector (vec.fromList [ 1,6,15,14,9 ])) ), +"overlapAdd-3.2": \( + compareUsing (mat.equal) + (fr.overlapAdd 1 3 2 [ mat.newRowVector (vec.fromList [ 1,2,3 ]), + mat.newRowVector (vec.fromList [ 4,5,6 ]), + mat.newRowVector (vec.fromList [ 7,8,9 ]) ]) + (mat.newRowVector (vec.fromList [ 1,2,7,5,13,8,9 ])) +), + ] is hash boolean>;