aboutsummaryrefslogtreecommitdiff
path: root/components/original.py
diff options
context:
space:
mode:
authorDH42017-06-06 02:07:13 -0500
committerDH42017-06-06 02:07:13 -0500
commit4920fcc0341c499da1826b5aaa05888755ba5ac1 (patch)
treeabef1e360207c862b72c56cad80b7ac9fd8189ea /components/original.py
parent0a8a2fdf71aeff8ea22905cdf00b6c315cbb29ee (diff)
parent7946e98f222784e25ea9c6dc00713f431e238609 (diff)
Merge branch 'component-backgrounds' of github.com:IamDH4/audio-visualizer-python into feature-newgui
Diffstat (limited to 'components/original.py')
-rw-r--r--components/original.py20
1 files changed, 5 insertions, 15 deletions
diff --git a/components/original.py b/components/original.py
index 6903a5f..b0a7579 100644
--- a/components/original.py
+++ b/components/original.py
@@ -58,6 +58,8 @@ class Component(__base__.Component):
self.smoothConstantUp = 0.8
self.lastSpectrum = None
self.spectrumArray = {}
+ self.width = int(self.worker.core.settings.value('outputWidth'))
+ self.height = int(self.worker.core.settings.value('outputHeight'))
for i in range(0, len(self.completeAudioArray), self.sampleSize):
if self.canceled:
@@ -72,12 +74,9 @@ class Component(__base__.Component):
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'))
- return self.drawBars(width, height, self.spectrumArray[frameNo], self.visColor, self.layout)
+
+ def frameRender(self, moduleNo, arrayNo, frameNo):
+ return self.drawBars(self.width, self.height, self.spectrumArray[arrayNo], self.visColor, self.layout)
def pickColor(self):
RGBstring, btnStyle = super().pickColor()
@@ -154,12 +153,3 @@ class Component(__base__.Component):
return im
- def cancel(self):
- self.canceled = True
-
- def reset(self):
- self.canceled = False
-
-
-
-