diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-09-18 11:04:48 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-09-18 11:04:48 +0200 |
commit | 2623ad8c187c61c6c3bad4819683346438529b89 (patch) | |
tree | 97135baab8361cc0df243d9fdee82ab659dc2c3b /src | |
parent | fa1e1ebca142e5256d50247ef13dc5efc56c6346 (diff) | |
download | dabmod-2623ad8c187c61c6c3bad4819683346438529b89.tar.gz dabmod-2623ad8c187c61c6c3bad4819683346438529b89.tar.bz2 dabmod-2623ad8c187c61c6c3bad4819683346438529b89.zip |
Keep tist offset across modulator restarts
Diffstat (limited to 'src')
-rw-r--r-- | src/DabModulator.cpp | 2 | ||||
-rw-r--r-- | src/DabModulator.h | 5 | ||||
-rw-r--r-- | src/EtiReader.cpp | 2 | ||||
-rw-r--r-- | src/EtiReader.h | 2 | ||||
-rw-r--r-- | src/TimestampDecoder.h | 8 |
5 files changed, 10 insertions, 9 deletions
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; |