"communication between capture and display."
self.audio_capture.c.drawSlot.connect(self.update)
def update(self, data): global ptr
self.spectrum_curve.setData(data*5)
if ptr == 0:
self.spectrum_plot.enableAutoRange('xy', False) ## stop auto-scaling after the first data set is plotted
ptr += 1
# timer = QtCore.QTimer()
# timer.timeout.connect(update)
# timer.start(50)
class AudioCapture(threading.Thread): def __init__(self, displaySignal):
threading.Thread.__init__(self)
"""pyaudio open the sound card"""
self.p = pyaudio.PyAudio()