From: Joel Holdsworth Date: Mon, 3 Mar 2014 22:27:50 +0000 (+0000) Subject: Fixed non-painting decode X-Git-Tag: pulseview-0.2.0~30 X-Git-Url: http://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=4c581c790c0e9d378a0074c2b2802a0d7f5c7579 Fixed non-painting decode --- diff --git a/pv/data/decoderstack.cpp b/pv/data/decoderstack.cpp index b252877b..4b2a9057 100644 --- a/pv/data/decoderstack.cpp +++ b/pv/data/decoderstack.cpp @@ -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 lock(_output_mutex); _samples_decoded = chunk_end; } + + if (i % DecodeNotifyPeriod == 0) + new_decode_data(); } new_decode_data(); diff --git a/pv/data/decoderstack.h b/pv/data/decoderstack.h index 9c960e58..4b271727 100644 --- a/pv/data/decoderstack.h +++ b/pv/data/decoderstack.h @@ -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,