I can't for the life of me figure this out.. I'm trying to take data received on a network connection, and then pipe it to a subprocess, which will stream the data to my soundcard via aplay.
I've managed to do this, but it pauses briefly while it receives the data.
while True:
data = sock.recv(1024)
p1.stdin.write(data)
What is the best way to setup a pipe that will stream from a network connection indefinitely? Setting up multiprocessing or threading to do this?
Thanks!