source: gs3-extensions/web-audio/trunk/js-mad/jsmad-master/tests/node/check.rb@ 28388

Last change on this file since 28388 was 28388, checked in by davidb, 11 years ago

Set of JS, CSS, PNG etc web resources to support a mixture of audio player/document display capabilities

File size: 392 bytes
Line 
1# Dir.chdir("../../../libmad") do
2# system("make minimad && ./minimad < one_second_beep.mp3 > ../jsmad/experiments/node/libmad.txt")
3# end
4
5# system("node test.js > jsmad.txt")
6
7libmad = File.readlines(ARGV[0])
8jsmad = File.readlines(ARGV[1])
9
10diffs = []
11
12libmad.zip(jsmad) do |a, b|
13 a.split("\t").zip(b.split("\t")) do |x, y|
14 diffs << (x.to_f - y.to_f).abs
15 end
16end
17
18puts diffs.max
Note: See TracBrowser for help on using the repository browser.