From 2623ad8c187c61c6c3bad4819683346438529b89 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 18 Sep 2015 11:04:48 +0200 Subject: Keep tist offset across modulator restarts --- src/DabModulator.cpp | 2 +- src/DabModulator.h | 5 +++-- src/EtiReader.cpp | 2 +- src/EtiReader.h | 2 +- src/TimestampDecoder.h | 8 ++++---- 5 files changed, 10 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/DabModulator.cpp b/src/DabModulator.cpp index e0e2bad..539de09 100644 --- a/src/DabModulator.cpp +++ b/src/DabModulator.cpp @@ -55,7 +55,7 @@ #include "Log.h" DabModulator::DabModulator( - double tist_offset_s, unsigned tist_delay_stages, + double& tist_offset_s, unsigned tist_delay_stages, RemoteControllers* rcs, const tii_config_t& tiiConfig, unsigned outputRate, unsigned clockRate, diff --git a/src/DabModulator.h b/src/DabModulator.h index 9150f5c..f212ecf 100644 --- a/src/DabModulator.h +++ b/src/DabModulator.h @@ -50,14 +50,15 @@ class DabModulator : public ModCodec { public: DabModulator( - double tist_offset_s, unsigned tist_delay_stages, + double& tist_offset_s, unsigned tist_delay_stages, RemoteControllers* rcs, const tii_config_t& tiiConfig, unsigned outputRate = 2048000, unsigned clockRate = 0, unsigned dabMode = 0, GainMode gainMode = GAIN_VAR, float digGain = 1.0, float normalise = 1.0, std::string filterTapsFilename = ""); - DabModulator(const DabModulator& copy); + DabModulator(const DabModulator& other) = delete; + DabModulator& operator=(const DabModulator& other) = delete; virtual ~DabModulator(); int process(Buffer* const dataIn, Buffer* dataOut); diff --git a/src/EtiReader.cpp b/src/EtiReader.cpp index 76f8dbb..3171a91 100644 --- a/src/EtiReader.cpp +++ b/src/EtiReader.cpp @@ -53,7 +53,7 @@ enum ETI_READER_STATE { EtiReader::EtiReader( - double tist_offset_s, + double& tist_offset_s, unsigned tist_delay_stages, RemoteControllers* rcs) : state(EtiReaderStateSync), diff --git a/src/EtiReader.h b/src/EtiReader.h index c5dfb70..c9cbe07 100644 --- a/src/EtiReader.h +++ b/src/EtiReader.h @@ -48,7 +48,7 @@ class EtiReader { public: EtiReader( - double tist_offset_s, + double& tist_offset_s, unsigned tist_delay_stages, RemoteControllers* rcs); diff --git a/src/TimestampDecoder.h b/src/TimestampDecoder.h index 9420506..5bb5ec8 100644 --- a/src/TimestampDecoder.h +++ b/src/TimestampDecoder.h @@ -101,16 +101,16 @@ class TimestampDecoder : public RemoteControllable /* The modulator adds this offset to the TIST to define time of * frame transmission */ - double offset_s, + double& offset_s, /* Specifies by how many stages the timestamp must be delayed. * (e.g. The FIRFilter is pipelined, therefore we must increase * tist_delay_stages by one if the filter is used */ unsigned tist_delay_stages) : - RemoteControllable("tist") + RemoteControllable("tist"), + timestamp_offset(offset_s) { - timestamp_offset = offset_s; m_tist_delay_stages = tist_delay_stages; inhibit_second_update = 0; time_pps = 0.0; @@ -174,7 +174,7 @@ class TimestampDecoder : public RemoteControllable uint32_t time_secs; int32_t latestFCT; double time_pps; - double timestamp_offset; + double& timestamp_offset; unsigned m_tist_delay_stages; int inhibit_second_update; bool offset_changed; -- cgit v1.2.3