changeset 218:dc82579c9a26

Add test for multiplexed audio
author Chris Cannam
date Fri, 20 Nov 2015 09:31:55 +0000
parents b84b946e8542
children d0fe861bb116
files tests/test-multiple-audio/expected/multiplexed.csv tests/test-multiple-audio/test-multiple-audio.sh
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-multiple-audio/expected/multiplexed.csv	Fri Nov 20 09:31:55 2015 +0000
@@ -0,0 +1,4 @@
+"3clicks.mp3",0.000000000,9.961360543,mean,168.319,"(mean value, continuous-time average)"
+,0.000000000,9.961360543,median,167,"(median value, continuous-time average)"
+,0.000000000,9.961360543,mode,170,"(modal value, continuous-time average)"
+,0.000000000,9.961360543,mean,710.597,"(mean value, continuous-time average)"
--- a/tests/test-multiple-audio/test-multiple-audio.sh	Fri Nov 20 09:31:46 2015 +0000
+++ b/tests/test-multiple-audio/test-multiple-audio.sh	Fri Nov 20 09:31:55 2015 +0000
@@ -99,3 +99,13 @@
 csvcompare $tmpfile $expected.csv || \
     faildiff "Output mismatch for transform $transform with summaries and mixed local/remote 2-file input" $tmpfile $expected.csv
 
+
+# 9. As 3, but multiplexing rather than extracting separately from each file
+
+$r -t $transform --multiplex -w csv --csv-stdout $audiopath/3clicks.mp3 $audiopath/6clicks.ogg --summary-only 2>/dev/null | sed 's,^"[^"]*/,",' > $tmpfile || \
+    fail "Fails to run transform $transform with 2-file input"
+
+expected=$mypath/expected/multiplexed
+csvcompare $tmpfile $expected.csv || \
+    faildiff "Output mismatch for transform $transform with summaries and 2-file multiplexed input" $tmpfile $expected.csv
+