From: Steinar H. Gunderson Date: Sun, 1 Nov 2015 00:24:42 +0000 (+0100) Subject: Update the VU/LRA meters from the GUI thread; fixes an issue where they lock up. X-Git-Tag: 1.0.0~196 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=4a02aa24a41bd7b1a5fad276914af1c7c3d8ee7f;p=nageru Update the VU/LRA meters from the GUI thread; fixes an issue where they lock up. --- diff --git a/lrameter.h b/lrameter.h index ec84b83..50497be 100644 --- a/lrameter.h +++ b/lrameter.h @@ -21,7 +21,7 @@ public: this->level_lufs = level_lufs; this->range_low_lufs = range_low_lufs; this->range_high_lufs = range_high_lufs; - update(); + QMetaObject::invokeMethod(this, "update", Qt::AutoConnection); } private: diff --git a/vumeter.h b/vumeter.h index 3492f77..720a12e 100644 --- a/vumeter.h +++ b/vumeter.h @@ -17,7 +17,7 @@ public: void set_level(float level_lufs) { std::unique_lock lock(level_mutex); this->level_lufs = level_lufs; - update(); + QMetaObject::invokeMethod(this, "update", Qt::AutoConnection); } private: