]> sigrok.org Git - pulseview.git/commitdiff
Fixed non-painting decode
authorJoel Holdsworth <redacted>
Mon, 3 Mar 2014 22:27:50 +0000 (22:27 +0000)
committerJoel Holdsworth <redacted>
Mon, 3 Mar 2014 22:41:41 +0000 (22:41 +0000)
pv/data/decoderstack.cpp
pv/data/decoderstack.h

index b252877b7098940c80ca7f82ba91b4466aa3246a..4b2a90576921178def34ca97dea23c3fe4d68e7c 100644 (file)
@@ -58,6 +58,7 @@ namespace data {
 const double DecoderStack::DecodeMargin = 1.0;
 const double DecoderStack::DecodeThreshold = 0.2;
 const int64_t DecoderStack::DecodeChunkLength = 4096;
+const unsigned int DecoderStack::DecodeNotifyPeriod = 65536;
 
 mutex DecoderStack::_global_decode_mutex;
 
@@ -314,6 +315,9 @@ void DecoderStack::decode_data(
                        lock_guard<mutex> lock(_output_mutex);
                        _samples_decoded = chunk_end;
                }
+
+               if (i % DecodeNotifyPeriod == 0)
+                       new_decode_data();
        }
 
        new_decode_data();
index 9c960e589972c1dd9492da78984992660ca79b86..4b2717279ba034fab245855c5273030eec521fd8 100644 (file)
@@ -72,6 +72,7 @@ private:
        static const double DecodeMargin;
        static const double DecodeThreshold;
        static const int64_t DecodeChunkLength;
+       static const unsigned int DecodeNotifyPeriod;
 
 public:
        DecoderStack(pv::SigSession &_session,