use latest improvementes for fft, too
This commit is contained in:
parent
8214fdb24d
commit
766300bdff
@ -376,25 +376,15 @@ class SpectrumThread(csdr.output):
|
|||||||
if self.sdrSource.isAvailable():
|
if self.sdrSource.isAvailable():
|
||||||
self.dsp.start()
|
self.dsp.start()
|
||||||
|
|
||||||
def receive_output(self, type, read_fn):
|
def supports_type(self, t):
|
||||||
if type != "audio":
|
return t == 'audio'
|
||||||
logger.error("unsupported output type received by FFT: %s", type)
|
|
||||||
return
|
|
||||||
|
|
||||||
|
def receive_output(self, type, read_fn):
|
||||||
if self.props["csdr_dynamic_bufsize"]:
|
if self.props["csdr_dynamic_bufsize"]:
|
||||||
read_fn(8) # dummy read to skip bufsize & preamble
|
read_fn(8) # dummy read to skip bufsize & preamble
|
||||||
logger.debug("Note: CSDR_DYNAMIC_BUFSIZE_ON = 1")
|
logger.debug("Note: CSDR_DYNAMIC_BUFSIZE_ON = 1")
|
||||||
|
|
||||||
def pipe():
|
threading.Thread(target=self.pump(read_fn, self.sdrSource.writeSpectrumData)).start()
|
||||||
run = True
|
|
||||||
while run:
|
|
||||||
data = read_fn()
|
|
||||||
if len(data) == 0:
|
|
||||||
run = False
|
|
||||||
else:
|
|
||||||
self.sdrSource.writeSpectrumData(data)
|
|
||||||
|
|
||||||
threading.Thread(target=pipe).start()
|
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self.dsp.stop()
|
self.dsp.stop()
|
||||||
|
Loading…
Reference in New Issue
Block a user