diff options
| author | DH4 | 2017-06-02 03:30:51 -0500 |
|---|---|---|
| committer | DH4 | 2017-06-02 03:30:51 -0500 |
| commit | 53598f7a85e0238d5c2c42cd248876fb4e06eb16 (patch) | |
| tree | b23053c518d60ebdecf7b92c258113688e1aa49e /components | |
| parent | 73a0492585e238d32869bfa9c53ddc95481ab1c5 (diff) | |
Progressbar enhancement.
Diffstat (limited to 'components')
| -rw-r--r-- | components/original.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/components/original.py b/components/original.py index e1240e9..6903a5f 100644 --- a/components/original.py +++ b/components/original.py @@ -66,6 +66,14 @@ class Component(__base__.Component): self.smoothConstantDown, self.smoothConstantUp, self.lastSpectrum) self.spectrumArray[i] = copy(self.lastSpectrum) + progress = int(100*(i/len(self.completeAudioArray))) + if progress >= 100: + progress = 100 + pStr = "Analyzing audio: "+ str(progress) +'%' + self.progressBarSetText.emit(pStr) + self.progressBarUpdate.emit(int(progress)) + + def frameRender(self, moduleNo, frameNo): width = int(self.worker.core.settings.value('outputWidth')) height = int(self.worker.core.settings.value('outputHeight')) @@ -151,3 +159,7 @@ class Component(__base__.Component): def reset(self): self.canceled = False + + + + |
