I'm using scapy and pyaudio to play a short length of sine wave every time a packet is sent or received, with the frequency of the sound indicating the sender address.
sniff(prn = makeSound)
In this code, the makeSound
function takes a packet, dissects it, and plays a sound based on the sender address.
As far as I know, pyaudio has either blocking or callback mode. In neither of these modes can I play multiple sounds simultaneously.
I need a way to start a note, and have it immediately start being mixed into the audio stream, regardless of how many sine waves are already in the process of being played.