aboutsummaryrefslogtreecommitdiff
path: root/src/components/original.py
diff options
context:
space:
mode:
authortassaron2017-07-27 17:49:08 -0400
committertassaron2017-07-27 17:49:08 -0400
commitde1324a6a75eb2a9f97d8a6b416077cfc73b2bc9 (patch)
tree2aebc32702f193280f6332a7aa6c3f21e4390ca0 /src/components/original.py
parent4329b0e947471ced7ca0b3460a5f40e2703117e9 (diff)
fixed video component eating stdout
+ made height/width into properties to simplify render methods
Diffstat (limited to 'src/components/original.py')
-rw-r--r--src/components/original.py10
1 files changed, 3 insertions, 7 deletions
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,