Esempio n. 1
0
 def set(self, rms, peak, decay):
     """ This is the main function, call this from any thread.
     0.0 <= rms, peak, decay <= 1.0
     """
     t = time.time() * 0.1
     if t - self._last_time > self.gov_sec:
         self._last_time = t
         e = QEvent(QEvent.User)
         e.rms = rms
         e.peak = peak
         e.decay = decay
         QCoreApplication.instance().postEvent(self, e)