diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-03-12 15:28:07 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-03-12 15:28:07 +0100 |
commit | f656ba53cd6ad89d583f39a982390504a1ec6a94 (patch) | |
tree | 31a4aa30ec6d2fdd7f2c940e3ed6122769018aff /src | |
parent | 705ae30e5f7cc2525627f338beef8c90a8678c2f (diff) | |
download | dabmod-f656ba53cd6ad89d583f39a982390504a1ec6a94.tar.gz dabmod-f656ba53cd6ad89d583f39a982390504a1ec6a94.tar.bz2 dabmod-f656ba53cd6ad89d583f39a982390504a1ec6a94.zip |
Lime: do not check fifoFilledCount before sending
Diffstat (limited to 'src')
-rw-r--r-- | src/output/Lime.cpp | 13 | ||||
-rw-r--r-- | src/output/Lime.h | 3 |
2 files changed, 4 insertions, 12 deletions
diff --git a/src/output/Lime.cpp b/src/output/Lime.cpp index 7aa7d67..3a5f893 100644 --- a/src/output/Lime.cpp +++ b/src/output/Lime.cpp @@ -378,18 +378,7 @@ void Lime::transmit_frame(const struct FrameData &frame) etiLog.level(info) << "overrun" << LimeStatus.overrun << "underun" << LimeStatus.underrun << "drop" << LimeStatus.droppedPackets; #endif - /* if(LimeStatus.fifoFilledCount>LimeStatus.fifoSize-2*FRAME_LENGTH*m_interpolate) // Drop if Fifo is just 2 frames before fullness - { - etiLog.level(info) << "Fifo overflow : drop"; - return; - }*/ - - // Wait if Fifo is just 2 frames before fullness - if (LimeStatus.fifoFilledCount < FRAME_LENGTH * 2 * m_interpolate) { - etiLog.level(info) << "Fifo underflow : duplicate for filling garbage"; - for (size_t i = 0; i < m_interpolate * 10; i++) - LMS_SendStream(&m_tx_stream, buf, numSamples, NULL, 1000); - } + m_last_fifo_filled_count.store(LimeStatus.fifoFilledCount); /* if(LimeStatus.fifoFilledCount>=5*FRAME_LENGTH*m_interpolate) // Start if FIFO is half full { diff --git a/src/output/Lime.h b/src/output/Lime.h index 89f3b7e..8658053 100644 --- a/src/output/Lime.h +++ b/src/output/Lime.h @@ -39,6 +39,7 @@ DESCRIPTION: #ifdef HAVE_LIMESDR +#include <atomic> #include <string> #include <memory> @@ -90,6 +91,8 @@ class Lime : public Output::SDRDevice size_t m_interpolate = 1; std::vector<complexf> interpolatebuf; + std::atomic<uint32_t> m_last_fifo_filled_count = ATOMIC_VAR_INIT(0); + size_t underflows = 0; size_t overflows = 0; size_t late_packets = 0; |