From 9303a63931ae83d95fbb6dd2d25d8f8e2810e889 Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 12 Oct 2016 00:53:26 +0200 Subject: [PATCH] DV Serial: prepare multi slot (4) --- sdrbase/dsp/dvserialworker.cpp | 8 ++++++++ sdrbase/dsp/dvserialworker.h | 1 + 2 files changed, 9 insertions(+) diff --git a/sdrbase/dsp/dvserialworker.cpp b/sdrbase/dsp/dvserialworker.cpp index 1220a518e..31bca0078 100644 --- a/sdrbase/dsp/dvserialworker.cpp +++ b/sdrbase/dsp/dvserialworker.cpp @@ -16,6 +16,7 @@ /////////////////////////////////////////////////////////////////////////////////// #include +#include #include "dsp/dvserialworker.h" #include "audio/audiofifo.h" @@ -182,3 +183,10 @@ void DVSerialWorker::upsample6(short *in, int nbSamplesIn, unsigned char channel m_fifoSlots[fifoSlot].m_upsamplerLastValue = in[i]; } } + +long long DVSerialWorker::getUSecs() +{ + struct timeval tp; + gettimeofday(&tp, 0); + return (long long) tp.tv_sec * 1000000L + tp.tv_usec; +} diff --git a/sdrbase/dsp/dvserialworker.h b/sdrbase/dsp/dvserialworker.h index 4c7332f33..4b710369b 100644 --- a/sdrbase/dsp/dvserialworker.h +++ b/sdrbase/dsp/dvserialworker.h @@ -152,6 +152,7 @@ private: }; void upsample6(short *in, int nbSamplesIn, unsigned char channels, unsigned int fifoSlot); + static long long getUSecs(); SerialDV::DVController m_dvController; bool m_running;