PulseAudio Loopback Latency
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?
sound pulseaudio
add a comment |
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?
sound pulseaudio
add a comment |
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?
sound pulseaudio
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?
sound pulseaudio
sound pulseaudio
edited Jul 5 '14 at 0:07
asked Jul 4 '14 at 23:13
Vilsol
75212
75212
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
I have found a temporary way out, but this still confuses me. I have made a combined module, and after that I link every sound source I want to the combined one, which then routes to my system sounds and to the Streaming sink.
STREAM_MODULE=$(pactl load-module module-null-sink sink_name=StreamAudio sink_properties=device.description="StreamAudio")
COMBINE_MODULE=$(pactl load-module module-combine-sink sink_name=Combined sink_properties=device.description="Combined" slaves=StreamAudio,alsa_output.pci-0000_00_1b.0.analog-stereo)
pactl load-module module-loopback rate=44000 adjust_time=0 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 $COMBINE_MODULE
pactl unload-module $STREAM_MODULE
pactl unload-module module-device-manager
pactl unload-module module-loopback
There is probably a way I can grep the results of pacmd list-clients
and then clean out only valid sources, change their output to the combined sink, but that would take too long and complex to do.
Though now a new problem arises, and I even tested it by running the command through terminal. For some reason I can't change the output sink of Java. Here is what I tried and what it returned:
vilsol@skynet:~$ pacmd move-sink-input 6421 124
Welcome to PulseAudio! Use "help" for usage information.
>>> Moved failed.
I tried with others as well and they all worked. 6421 is the Java index, and 124 is the sink index.
add a comment |
Bit late but for those who still need help:
Install the 'PulseAudio Loopback Device' GNOME Shell Extension (just search the bit in quotes in Ubuntu Software).
It has hardly any noticable latency and was a perfect solution for me after quite a bit of searching!
Hope this is useful to somebody!
add a comment |
Sometime ago I was able to loopback my guitar to the speakers without noticeable delay, so pulseaudio supports that, but I remember having trouble with delays less than 10ms. My suggestions are
- to review the command parameters
- use a bigger delay
- test each loopback separately and
- ask directly pulseaudio developers for instructions.
I have already tried testing each one separately even then the system audio makes a massive buffer, the actual arguments are fine as well. I have also tried increasing the latency, that doesn't help either. I will probably have to ask in the PulseAudio community.
– Vilsol
Jul 5 '14 at 17:28
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f491825%2fpulseaudio-loopback-latency%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
I have found a temporary way out, but this still confuses me. I have made a combined module, and after that I link every sound source I want to the combined one, which then routes to my system sounds and to the Streaming sink.
STREAM_MODULE=$(pactl load-module module-null-sink sink_name=StreamAudio sink_properties=device.description="StreamAudio")
COMBINE_MODULE=$(pactl load-module module-combine-sink sink_name=Combined sink_properties=device.description="Combined" slaves=StreamAudio,alsa_output.pci-0000_00_1b.0.analog-stereo)
pactl load-module module-loopback rate=44000 adjust_time=0 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 $COMBINE_MODULE
pactl unload-module $STREAM_MODULE
pactl unload-module module-device-manager
pactl unload-module module-loopback
There is probably a way I can grep the results of pacmd list-clients
and then clean out only valid sources, change their output to the combined sink, but that would take too long and complex to do.
Though now a new problem arises, and I even tested it by running the command through terminal. For some reason I can't change the output sink of Java. Here is what I tried and what it returned:
vilsol@skynet:~$ pacmd move-sink-input 6421 124
Welcome to PulseAudio! Use "help" for usage information.
>>> Moved failed.
I tried with others as well and they all worked. 6421 is the Java index, and 124 is the sink index.
add a comment |
I have found a temporary way out, but this still confuses me. I have made a combined module, and after that I link every sound source I want to the combined one, which then routes to my system sounds and to the Streaming sink.
STREAM_MODULE=$(pactl load-module module-null-sink sink_name=StreamAudio sink_properties=device.description="StreamAudio")
COMBINE_MODULE=$(pactl load-module module-combine-sink sink_name=Combined sink_properties=device.description="Combined" slaves=StreamAudio,alsa_output.pci-0000_00_1b.0.analog-stereo)
pactl load-module module-loopback rate=44000 adjust_time=0 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 $COMBINE_MODULE
pactl unload-module $STREAM_MODULE
pactl unload-module module-device-manager
pactl unload-module module-loopback
There is probably a way I can grep the results of pacmd list-clients
and then clean out only valid sources, change their output to the combined sink, but that would take too long and complex to do.
Though now a new problem arises, and I even tested it by running the command through terminal. For some reason I can't change the output sink of Java. Here is what I tried and what it returned:
vilsol@skynet:~$ pacmd move-sink-input 6421 124
Welcome to PulseAudio! Use "help" for usage information.
>>> Moved failed.
I tried with others as well and they all worked. 6421 is the Java index, and 124 is the sink index.
add a comment |
I have found a temporary way out, but this still confuses me. I have made a combined module, and after that I link every sound source I want to the combined one, which then routes to my system sounds and to the Streaming sink.
STREAM_MODULE=$(pactl load-module module-null-sink sink_name=StreamAudio sink_properties=device.description="StreamAudio")
COMBINE_MODULE=$(pactl load-module module-combine-sink sink_name=Combined sink_properties=device.description="Combined" slaves=StreamAudio,alsa_output.pci-0000_00_1b.0.analog-stereo)
pactl load-module module-loopback rate=44000 adjust_time=0 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 $COMBINE_MODULE
pactl unload-module $STREAM_MODULE
pactl unload-module module-device-manager
pactl unload-module module-loopback
There is probably a way I can grep the results of pacmd list-clients
and then clean out only valid sources, change their output to the combined sink, but that would take too long and complex to do.
Though now a new problem arises, and I even tested it by running the command through terminal. For some reason I can't change the output sink of Java. Here is what I tried and what it returned:
vilsol@skynet:~$ pacmd move-sink-input 6421 124
Welcome to PulseAudio! Use "help" for usage information.
>>> Moved failed.
I tried with others as well and they all worked. 6421 is the Java index, and 124 is the sink index.
I have found a temporary way out, but this still confuses me. I have made a combined module, and after that I link every sound source I want to the combined one, which then routes to my system sounds and to the Streaming sink.
STREAM_MODULE=$(pactl load-module module-null-sink sink_name=StreamAudio sink_properties=device.description="StreamAudio")
COMBINE_MODULE=$(pactl load-module module-combine-sink sink_name=Combined sink_properties=device.description="Combined" slaves=StreamAudio,alsa_output.pci-0000_00_1b.0.analog-stereo)
pactl load-module module-loopback rate=44000 adjust_time=0 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 $COMBINE_MODULE
pactl unload-module $STREAM_MODULE
pactl unload-module module-device-manager
pactl unload-module module-loopback
There is probably a way I can grep the results of pacmd list-clients
and then clean out only valid sources, change their output to the combined sink, but that would take too long and complex to do.
Though now a new problem arises, and I even tested it by running the command through terminal. For some reason I can't change the output sink of Java. Here is what I tried and what it returned:
vilsol@skynet:~$ pacmd move-sink-input 6421 124
Welcome to PulseAudio! Use "help" for usage information.
>>> Moved failed.
I tried with others as well and they all worked. 6421 is the Java index, and 124 is the sink index.
edited Jul 6 '14 at 17:58
answered Jul 6 '14 at 17:38
Vilsol
75212
75212
add a comment |
add a comment |
Bit late but for those who still need help:
Install the 'PulseAudio Loopback Device' GNOME Shell Extension (just search the bit in quotes in Ubuntu Software).
It has hardly any noticable latency and was a perfect solution for me after quite a bit of searching!
Hope this is useful to somebody!
add a comment |
Bit late but for those who still need help:
Install the 'PulseAudio Loopback Device' GNOME Shell Extension (just search the bit in quotes in Ubuntu Software).
It has hardly any noticable latency and was a perfect solution for me after quite a bit of searching!
Hope this is useful to somebody!
add a comment |
Bit late but for those who still need help:
Install the 'PulseAudio Loopback Device' GNOME Shell Extension (just search the bit in quotes in Ubuntu Software).
It has hardly any noticable latency and was a perfect solution for me after quite a bit of searching!
Hope this is useful to somebody!
Bit late but for those who still need help:
Install the 'PulseAudio Loopback Device' GNOME Shell Extension (just search the bit in quotes in Ubuntu Software).
It has hardly any noticable latency and was a perfect solution for me after quite a bit of searching!
Hope this is useful to somebody!
edited Dec 14 at 20:10
Kevin Bowen
14.2k145969
14.2k145969
answered Dec 14 at 19:09
Kiran
1
1
add a comment |
add a comment |
Sometime ago I was able to loopback my guitar to the speakers without noticeable delay, so pulseaudio supports that, but I remember having trouble with delays less than 10ms. My suggestions are
- to review the command parameters
- use a bigger delay
- test each loopback separately and
- ask directly pulseaudio developers for instructions.
I have already tried testing each one separately even then the system audio makes a massive buffer, the actual arguments are fine as well. I have also tried increasing the latency, that doesn't help either. I will probably have to ask in the PulseAudio community.
– Vilsol
Jul 5 '14 at 17:28
add a comment |
Sometime ago I was able to loopback my guitar to the speakers without noticeable delay, so pulseaudio supports that, but I remember having trouble with delays less than 10ms. My suggestions are
- to review the command parameters
- use a bigger delay
- test each loopback separately and
- ask directly pulseaudio developers for instructions.
I have already tried testing each one separately even then the system audio makes a massive buffer, the actual arguments are fine as well. I have also tried increasing the latency, that doesn't help either. I will probably have to ask in the PulseAudio community.
– Vilsol
Jul 5 '14 at 17:28
add a comment |
Sometime ago I was able to loopback my guitar to the speakers without noticeable delay, so pulseaudio supports that, but I remember having trouble with delays less than 10ms. My suggestions are
- to review the command parameters
- use a bigger delay
- test each loopback separately and
- ask directly pulseaudio developers for instructions.
Sometime ago I was able to loopback my guitar to the speakers without noticeable delay, so pulseaudio supports that, but I remember having trouble with delays less than 10ms. My suggestions are
- to review the command parameters
- use a bigger delay
- test each loopback separately and
- ask directly pulseaudio developers for instructions.
edited Jul 5 '14 at 18:01
guntbert
9,078133169
9,078133169
answered Jul 5 '14 at 16:16
Henrique
1
1
I have already tried testing each one separately even then the system audio makes a massive buffer, the actual arguments are fine as well. I have also tried increasing the latency, that doesn't help either. I will probably have to ask in the PulseAudio community.
– Vilsol
Jul 5 '14 at 17:28
add a comment |
I have already tried testing each one separately even then the system audio makes a massive buffer, the actual arguments are fine as well. I have also tried increasing the latency, that doesn't help either. I will probably have to ask in the PulseAudio community.
– Vilsol
Jul 5 '14 at 17:28
I have already tried testing each one separately even then the system audio makes a massive buffer, the actual arguments are fine as well. I have also tried increasing the latency, that doesn't help either. I will probably have to ask in the PulseAudio community.
– Vilsol
Jul 5 '14 at 17:28
I have already tried testing each one separately even then the system audio makes a massive buffer, the actual arguments are fine as well. I have also tried increasing the latency, that doesn't help either. I will probably have to ask in the PulseAudio community.
– Vilsol
Jul 5 '14 at 17:28
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f491825%2fpulseaudio-loopback-latency%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown