Skip to content
Snippets Groups Projects
Commit 93a6d834 authored by Kipp Cannon's avatar Kipp Cannon
Browse files

gstlal: add check for bad disconts from resampler

- the audioresampler in gstreamer 1.x no longer produces bad discont flags.
  we can remove all use of lal_nofakedisconts element, but before we do
  this patch adds a test to make sure the bug doesn't reappear
parent 314146de
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@ EXTRA_DIST = \
lal_reblock_test_01.sh \
matrixmixer_test_01.py \
resample_test_01.py \
resample_test_02.sh \
segmentsrc_test_01.py \
statevector_test_01.py \
sumsquares_test_01.py \
......@@ -23,7 +24,7 @@ EXTRA_DIST = \
peak_test_01.py \
drop_test_01.py
TESTS = cachesrc_test_01.sh firbank_test_01.py gate_test_01.py lal_reblock_test_01.sh matrixmixer_test_01.py resample_test_01.py segmentsrc_test_01.py statevector_test_01.py sumsquares_test_01.py togglecomplex_test_01.py whiten_test_01.py peak_test_01.py drop_test_01.py
TESTS = cachesrc_test_01.sh firbank_test_01.py gate_test_01.py lal_reblock_test_01.sh matrixmixer_test_01.py resample_test_01.py resample_test_02.sh segmentsrc_test_01.py statevector_test_01.py sumsquares_test_01.py togglecomplex_test_01.py whiten_test_01.py peak_test_01.py drop_test_01.py
pkgpython_PYTHON = \
cmp_nxydumps.py
......
#!/bin/sh
# check for bad discont flags in output of audioresample by generating a
# stream with 1 sample per buffer, and then downsampling to a lower sample
# rate so that some input buffers produce no output buffers. the correct
# behaviour is for it to produce buffers with no data, but old versions
# produced no buffer followed by a buffer marked as a discont (due to
# unavoidable behaviour in the GstBaseTransform class from which it is
# derived).
run_test() {
gst-launch-1.0 \
audiotestsrc wave=0 samplesperbuffer=1 num-buffers=1024 \
! audio/x-raw,rate=512,format=F64LE,channels=1 \
! audioresample \
! audio/x-raw,rate=128 \
! lal_checktimestamps \
! fakesink
}
! run_test 2>&1 | grep -q "lal_checktimestamps"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment