aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/UHD.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-14 08:46:37 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-14 08:46:37 +0100
commitbcf39bd3ff478deae0dcc51f1021ceb8700c22cc (patch)
treebe97bd84040ec6549d1cb278ed6a1d0826f17eaf /src/output/UHD.cpp
parentb3d71cdcdad02fb17f7d6e484a3e043def426782 (diff)
downloaddabmod-bcf39bd3ff478deae0dcc51f1021ceb8700c22cc.tar.gz
dabmod-bcf39bd3ff478deae0dcc51f1021ceb8700c22cc.tar.bz2
dabmod-bcf39bd3ff478deae0dcc51f1021ceb8700c22cc.zip
Fix timestamp handling
Diffstat (limited to 'src/output/UHD.cpp')
-rw-r--r--src/output/UHD.cpp25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/output/UHD.cpp b/src/output/UHD.cpp
index 0d46360..97cf5bb 100644
--- a/src/output/UHD.cpp
+++ b/src/output/UHD.cpp
@@ -256,25 +256,12 @@ void UHD::transmit_frame(const struct FrameData& frame)
bool tx_allowed = true;
- if (m_conf.enableSync) {
- if (frame.ts.timestamp_valid) {
- uhd::time_spec_t timespec(
- frame.ts.timestamp_sec, frame.ts.pps_offset());
- md_tx.time_spec = timespec;
- md_tx.has_time_spec = true;
- }
- else {
- if (m_conf.muteNoTimestamps) {
- std::this_thread::sleep_for(std::chrono::seconds(
- std::lround(
- ((double)sizeIn) /
- ((double)m_conf.sampleRate))));
- tx_allowed = false;
- }
- else {
- md_tx.has_time_spec = false;
- }
- }
+ // muting and mutenotimestamp is handled by SDR
+ if (m_conf.enableSync and frame.ts.timestamp_valid) {
+ uhd::time_spec_t timespec(
+ frame.ts.timestamp_sec, frame.ts.pps_offset());
+ md_tx.time_spec = timespec;
+ md_tx.has_time_spec = true;
}
else {
md_tx.has_time_spec = false;