Commit a2e9556f authored by Stefan Westerfeld's avatar Stefan Westerfeld

SRC: add speed test crash reproduce script

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 267755d2
set -Eeo pipefail
X=1
while :
do
echo "## $X"
audiowmark cmp test-speed-crash.wav f0 --detect-speed --test-speed 0.9764
X=$((X + 1))
done
......@@ -87,6 +87,9 @@ public:
Mags&
operator() (int row, int col)
{
assert (row >= 0 && row < m_rows);
assert (col >= 0 && col < m_cols);
return m_data[row * m_cols + col];
}
void
......@@ -259,6 +262,8 @@ SpeedSync::prepare_mags (const SpeedScanParams& scan_params)
dmag += fft_out_db[sync_bit.down[i]];
}
sync_matrix (row, col++) = MagMatrix::Mags {umag, dmag};
assert (umag != 0);
assert (dmag != 0);
}
assert (col == n_sync_cols);
row++;
......@@ -293,6 +298,8 @@ SpeedSync::compare_bits (BitValue *bit_values, double relative_speed, int *start
auto& bv = bit_values[si->bit];
auto mags = sync_matrix (index, mi);
assert (mags.umag != 0);
assert (mags.dmag != 0);
if (B2)
{
bv.umag += mags.dmag;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment