From 39e66ffa2d07b87b57ed90b369ab26aedf0a69e8 Mon Sep 17 00:00:00 2001 From: tassaron Date: Sun, 4 Jun 2017 13:00:36 -0400 Subject: video component almost working, rm hardcoded backgrounds --- components/original.py | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'components/original.py') 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 - - - - -- cgit v1.2.3