ref: be06e53a62093e13171b2efc2c95dde0391028fa
parent: 95e033648c5a5335225f4bfedf8380d3e273f989
author: Paul Brossier <piem@piem.org>
date: Sat Apr 30 00:17:09 EDT 2016
Makefile: add 'create_test_sounds' target
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,9 @@
WAFCMD=python waf
+SOX=sox
+
ENABLE_DOUBLE := $(shell [ -z $(HAVE_DOUBLE) ] || echo --enable-double )
+TESTSOUNDS := "python/tests/sounds"
all: build
@@ -55,3 +58,12 @@
help:
$(WAFCMD) --help
+
+create_test_sounds:
+ [ -z `which $(SOX)` ] && ( echo $(SOX) could not be found; false ) || true
+ $(MKDIR) -p $(TESTSOUNDS)
+ $(SOX) -r 44100 -n $(TESTSOUNDS)/44100Hz_1f_silence.wav synth 1s silence 0
+ $(SOX) -r 8000 -n $(TESTSOUNDS)/8000Hz_30s_silence.wav synth 30 silence 0
+ $(SOX) -r 32000 -n $(TESTSOUNDS)/32000Hz_127f_sine440.wav synth 127 sine 440
+ $(SOX) -r 22050 -n $(TESTSOUNDS)/22050Hz_5s_brownnoise.wav synth 5 brownnoise
+ $(SOX) -r 48000 -n $(TESTSOUNDS)/48000Hz_60s_sweep.wav synth 60 sine 200-24000