pipe-test.sh 406 B

123456789101112131415
  1. #!/bin/bash
  2. source test-common.sh
  3. IN_WAV=pipe-test.wav
  4. OUT_WAV=pipe-test-out.wav
  5. audiowmark test-gen-noise $IN_WAV 200 44100
  6. cat $IN_WAV | audiowmark_add - - $TEST_MSG > $OUT_WAV || die "watermark from pipe failed"
  7. audiowmark_cmp --expect-matches 5 $OUT_WAV $TEST_MSG
  8. cat $OUT_WAV | audiowmark_cmp --expect-matches 5 - $TEST_MSG || die "watermark detection from pipe failed"
  9. rm $IN_WAV $OUT_WAV
  10. exit 0