diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-11-02 14:11:26 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-11-02 14:11:26 +0100 |
commit | 450c1e1d29a08326f4a370005bacafd528cd25e7 (patch) | |
tree | d9c21863bf6c1c0e2024203a5e1f1731f7e36f18 /src/TimestampDecoder.h | |
parent | 1c5372335338962ccbe9e876467b7e0ea46877ac (diff) | |
download | dabmod-450c1e1d29a08326f4a370005bacafd528cd25e7.tar.gz dabmod-450c1e1d29a08326f4a370005bacafd528cd25e7.tar.bz2 dabmod-450c1e1d29a08326f4a370005bacafd528cd25e7.zip |
Create new SDR output abstraction and port Soapy
Diffstat (limited to 'src/TimestampDecoder.h')
-rw-r--r-- | src/TimestampDecoder.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/TimestampDecoder.h b/src/TimestampDecoder.h index e0dee2a..34d862f 100644 --- a/src/TimestampDecoder.h +++ b/src/TimestampDecoder.h @@ -43,7 +43,7 @@ struct frame_timestamp uint32_t timestamp_sec; uint32_t timestamp_pps; // In units of 1/16384000 s - bool timestamp_valid; + bool timestamp_valid = false; bool timestamp_refresh; frame_timestamp() = default; @@ -88,6 +88,12 @@ struct frame_timestamp return timestamp_pps / 16384000.0; } + double get_real_secs() const { + double t = timestamp_sec; + t += timestamp_pps; + return t; + } + void print(const char* t) { fprintf(stderr, |