use the fft chain directly without csdr dsp classes

This commit is contained in:
Jakob Ketterl
2021-01-23 19:27:01 +01:00
parent 4e429d047d
commit 4b94126dc3
2 changed files with 63 additions and 29 deletions

View File

@ -35,3 +35,23 @@ class Chain(Flow):
return
self.output = buffer
self.workers[-1].setOutput(buffer)
def pump(self, write):
if self.output is None:
self.setOutput(Buffer())
def copy():
run = True
while run:
data = None
try:
data = self.output.read()
except ValueError:
pass
if data is None or (isinstance(data, bytes) and len(data) == 0):
run = False
else:
write(data)
return copy