aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/output/Lime.cpp13
-rw-r--r--src/output/Lime.h3
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;