From c31ca6f60e1b7b088973779d0264bef1f5142494 Mon Sep 17 00:00:00 2001 From: csrichter Date: Thu, 27 Apr 2017 16:38:47 +0200 Subject: [PATCH] added clockslip correction (untested) --- lib/rds_decoder_redsea_impl.cc | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/lib/rds_decoder_redsea_impl.cc b/lib/rds_decoder_redsea_impl.cc index 3493b93..e6d0179 100644 --- a/lib/rds_decoder_redsea_impl.cc +++ b/lib/rds_decoder_redsea_impl.cc @@ -306,23 +306,14 @@ int rds_decoder_redsea_impl::work (int noutput_items, if (num_diff_bits<2){ dout << "clockslip detection (forward,skipped one):"<(dataword)<<"\tlast_pi:"<(last_pi)<(dataword)<<"\tlast_pi:"<(last_pi)<>2); - diff2=(dataword>>2)^(last_pi); - num_diff_bits = std::bitset<16>(diff).count(); - num_diff_bits2 = std::bitset<16>(diff2).count(); - if (num_diff_bits<2){ - dout << "clockslip detection (forward,skipped two):"<(dataword)<<"\tlast_pi:"<(last_pi)<(dataword)<<"\tlast_pi:"<(last_pi)<28) {//reduced from 35 + if (wrong_blocks_counter>35) {//reduced from 35 lout << "@@@@@ Lost Sync (Got " << wrong_blocks_counter << " bad blocks on " << blocks_counter << " total)" << std::endl;