]> git.sesse.net Git - nageru/commitdiff
Update the VU/LRA meters from the GUI thread; fixes an issue where they lock up.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 1 Nov 2015 00:24:42 +0000 (01:24 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 1 Nov 2015 00:24:42 +0000 (01:24 +0100)
lrameter.h
vumeter.h

index ec84b83cd71716c79788ad247e68f44f348d320b..50497be5fa23f753e7a57b02849e11f7bb894685 100644 (file)
@@ -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:
index 3492f770c69e9e61390a85e1b96cb58cebf073b1..720a12e5217b2225d3f0f022b45b8e2b79c40c32 100644 (file)
--- a/vumeter.h
+++ b/vumeter.h
@@ -17,7 +17,7 @@ public:
        void set_level(float level_lufs) {
                std::unique_lock<std::mutex> lock(level_mutex);
                this->level_lufs = level_lufs;
-               update();
+               QMetaObject::invokeMethod(this, "update", Qt::AutoConnection);
        }
 
 private: