Mercurial > hg > may
changeset 523:7d89a177ff2e
Fix some compile errors due to changed apis
author | Chris Cannam |
---|---|
date | Wed, 20 Nov 2013 19:17:28 +0000 |
parents | 8d93ec2a0e08 |
children | 2739f77b8c83 |
files | src/may/matrix/test/speedtest.yeti src/may/stream/test/speedtest.yeti |
diffstat | 2 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/may/matrix/test/speedtest.yeti Wed Nov 20 18:05:08 2013 +0000 +++ b/src/may/matrix/test/speedtest.yeti Wed Nov 20 19:17:28 2013 +0000 @@ -179,8 +179,8 @@ e); print "Making \(sz) * \(sz) random matrix with \(nnz) entries..."; -rms = time \(mat.newSparseMatrix (RowMajor ()) { rows = sz, columns = sz } - entries); +rms = time \(mat.newSparseMatrix { rows = sz, columns = sz } + (Rows entries)); println "Reported density: \(mat.density rms) (non-zero values: \(mat.nonZeroValues rms))"; print "Making col-major copy...";
--- a/src/may/stream/test/speedtest.yeti Wed Nov 20 18:05:08 2013 +0000 +++ b/src/may/stream/test/speedtest.yeti Wed Nov 20 19:17:28 2013 +0000 @@ -4,7 +4,8 @@ af = load may.stream.audiofile; vec = load may.vector; mat = load may.matrix; -filt = load may.stream.filter; +convolve = load may.stream.convolve; +resample = load may.stream.resample; import java.lang: StackOverflowError; @@ -14,7 +15,7 @@ str = time "open audio file" \(af.openMono "shortish.wav"); -conv = time "prepare convolve" \(filt.convolvedWith [ Framesize 256 ] (mat.newRowVector (vec.fromList [ 1, 0.8, 0.5 ])) str); +conv = time "prepare convolve" \(convolve.convolvedWith [ Framesize 256 ] (mat.newRowVector (vec.fromList [ 1, 0.8, 0.5 ])) str); var len = 0; time "read convolve" \((not conv.finished?) loop len := len + mat.width (conv.read 65536)); @@ -32,7 +33,7 @@ str = time "open audio file" \(af.openMono "shortish.wav"); -res = time "prepare resample" \(filt.resampledTo 44100 str); +res = time "prepare resample" \(resample.resampledTo 44100 str); len := 0; time "read resampled" \((not res.finished?) loop len := len + mat.width (res.read 65536));