fix test.js v0.0.1
authorGray Leonard <gl7039a@american.edu>
Sat, 16 Apr 2016 01:38:17 +0000 (21:38 -0400)
committerGray Leonard <gl7039a@american.edu>
Sat, 16 Apr 2016 01:38:17 +0000 (21:38 -0400)
test.js

diff --git a/test.js b/test.js
index 787ff8a..dc43e1f 100644 (file)
--- a/test.js
+++ b/test.js
@@ -35,12 +35,12 @@ var get_file_bpm = function(path, params) {
 
                aubio.aubio_source_do(source, samples, tmp_read);
 
-               aubio.aubio_pitch_do(pitch, test_fvec, out_fvec);
+               aubio.aubio_pitch_do(pitch, samples, out_fvec);
                var cur_time = total_frames / samplerate;
                var last_pitch = aubio.fvec_get_sample(out_fvec, 0);
                //console.log('pitch at %d seconds: %d Hz', cur_time, last_pitch);
 
-               aubio.aubio_tempo_do(tempo, test_fvec, out_fvec);
+               aubio.aubio_tempo_do(tempo, samples, out_fvec);
                var is_beat = aubio.fvec_get_sample(out_fvec, 0);
                if (is_beat) {
                        var last_beat = aubio.aubio_tempo_get_last_s(tempo);