From 737c98bf8a7ac0eba91d3c4415f2acf0dd4f991b Mon Sep 17 00:00:00 2001 From: Kevin Luchsinger Date: Sat, 8 Oct 2016 21:26:10 +0200 Subject: [PATCH] fixes issue #76 (timestamps did "overflow" after 536 seconds) --- lib/preamble_impl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/preamble_impl.cc b/lib/preamble_impl.cc index c52523d..c55dd7a 100644 --- a/lib/preamble_impl.cc +++ b/lib/preamble_impl.cc @@ -121,7 +121,7 @@ static pmt::pmt_t tag_to_timestamp(gr::tag_t tstamp, uint64_t abs_sample_cnt, in // int((abs_sample_cnt - tstamp.offset)/sps) is the integer offset // (abs_sample_cnt - tstamp.offset)/sps is the fractional offset - uint64_t int_offset = int(abs_sample_cnt - tstamp.offset)/rate; + uint64_t int_offset = (abs_sample_cnt - tstamp.offset)/rate; double frac_offset = ((abs_sample_cnt - tstamp.offset) % rate) / double(rate); uint64_t abs_whole = last_whole_stamp + int_offset;