From de1324a6a75eb2a9f97d8a6b416077cfc73b2bc9 Mon Sep 17 00:00:00 2001 From: tassaron Date: Thu, 27 Jul 2017 17:49:08 -0400 Subject: fixed video component eating stdout + made height/width into properties to simplify render methods --- src/components/original.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/components/original.py') diff --git a/src/components/original.py b/src/components/original.py index 570465d..3d1a574 100644 --- a/src/components/original.py +++ b/src/components/original.py @@ -59,13 +59,11 @@ class Component(Component): saveValueStore['visColor'] = self.visColor return saveValueStore - def previewRender(self, previewWorker): + def previewRender(self): spectrum = numpy.fromfunction( lambda x: float(self.scale)/2500*(x-128)**2, (255,), dtype="int16") - width = int(self.settings.value('outputWidth')) - height = int(self.settings.value('outputHeight')) return self.drawBars( - width, height, spectrum, self.visColor, self.layout + self.width, self.height, spectrum, self.visColor, self.layout ) def preFrameRender(self, **kwargs): @@ -74,8 +72,6 @@ class Component(Component): self.smoothConstantUp = 0.8 self.lastSpectrum = None self.spectrumArray = {} - self.width = int(self.settings.value('outputWidth')) - self.height = int(self.settings.value('outputHeight')) for i in range(0, len(self.completeAudioArray), self.sampleSize): if self.canceled: @@ -93,7 +89,7 @@ class Component(Component): self.progressBarSetText.emit(pStr) self.progressBarUpdate.emit(int(progress)) - def frameRender(self, layerNo, frameNo): + def frameRender(self, frameNo): arrayNo = frameNo * self.sampleSize return self.drawBars( self.width, self.height, -- cgit v1.2.3