Skip to content

Commit

Permalink
AF-TESTS: compute soundfont test threshold based on fluidsynth version
Browse files Browse the repository at this point in the history
Versions >= 1.1.7 use strict threshold.

Signed-off-by: Stefan Westerfeld <stefan@space.twc.de>
  • Loading branch information
swesterfeld committed Jun 11, 2018
1 parent 9a844bb commit 572be9b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion af-tests/Makefile.sub
Expand Up @@ -26,6 +26,8 @@ AF_TESTS_BSE2WAV = $(strip \
--bse-override-sample-path '$(top_srcdir)/af-tests:$(top_srcdir)/library/samples' \
--bse-disable-randomization )

VERSIONCMP = $(top_srcdir)/af-tests/versioncmp.sh

# == af-tests/adsrtest ==
af-tests/adsrtest: af-tests/adsrtest.bse af-tests/adsrtest.ref
$(QWAVCHECK) # ADSR Test checks the mono channel envelope rendering
Expand Down Expand Up @@ -186,7 +188,7 @@ af-tests/soundfont-test: af-tests/soundfont-test.bse af-tests/soundfont-test.ref
$(Q) $(AF_TESTS_BSE2WAV) $@.bse $@.wav
$(Q) $(BSEFEXTRACT) $@.wav --cut-zeros --channel 0 --avg-spectrum --spectrum --avg-energy --end-time > $@.tmp
$(Q) $(BSEFEXTRACT) $@.wav --cut-zeros --channel 1 --avg-spectrum --spectrum --avg-energy --end-time >> $@.tmp
$(Q) $(BSEFCOMPARE) $@.ref $@.tmp --threshold $(FLUID_THRESHOLD)
$(Q) $(BSEFCOMPARE) $@.ref $@.tmp --threshold $(shell $(VERSIONCMP) $(FLUID_VERSION) 1.1.7 99.99 99.7)
$(Q) rm -f $@.wav $@.tmp
check-af-tests: af-tests/soundfont-test

Expand Down

0 comments on commit 572be9b

Please sign in to comment.