I am using pulseaudio loopback's to link together my system sounds and my microphone. The problem is that my system sounds have a delay of a second or even more sometimes. I have changed ticked simultaneous in paprefs but that has not fixed it. I am using this script to do so.

STREAM_MODULE=$(pactl load-module module-null-sink sink_name=StreamAudio sink_properties=device.description="StreamAudio") pactl load-module module-loopback source=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor sink=StreamAudio latency_msec=1 >> /dev/null pactl load-module module-loopback source=alsa_input.usb-AKM_AK5370-00-AK5370.analog-mono sink=StreamAudio latency_msec=1 >> /dev/null pactl load-module module-device-manager >> /dev/null read -p "Loaded! Press enter to unload!" pactl unload-module $STREAM_MODULE pactl unload-module module-device-manager pactl unload-module module-null-sink pactl unload-module module-loopback

I have gone through pages of google, but nothing seems to fix it. Is there something obvious I am missing?

alsa_output.pci-0000_00_1b.0.analog-stereo.monitor are all my system sounds.

alsa_input.usb-AKM_AK5370-00-AK5370.analog-mono is my microphone

Here is an example where the delay becomes 3.4 seconds: http://screencloud.net/v/tNAQ while the other loopback has a lot less http://screencloud.net/v/suIF

From what I can tell, for some reason the buffer fills up. Any way I can flush it or something?