On Tue, Jun 4, 2013 at 3:08 AM, Jonathan Wilkes jancsika@yahoo.com wrote:
[...]
Sorry, I'm talking about a few things at once. One would be to test Pd by itself with ALSA backend vs. Pd by itself with JACK backend. That would provide some data re: the page you linked to about latency. (My suggestion about Pd->JACK + VLC-with-jack-backend->JACK was meant to cover that case and also compare to Pd->JACK +Pulse->JACK, but as you say we can delve into that later.)
The other is: what's a "recommendable" setup for using Pd in GNU/Linux with acceptable/controllable latency while still behaving with the rest of the system. Your Pd/Pulse/JACK measurements help to address that.
You're right, JACK's latency 'discrepancy' should be investigated separately. On my system I observe this behaviour:
- Pd with ALSA: measured latency is [Pd-nominal-latency + 3] milliseconds - Pd through JACK with ALSA: measured latency is [JACK-nominal-latency * 2 + 3] ms - Pd + PulseAudio through JACK with ALSA: [JACK-nominal-latency * 2 + 3] ms
Here it seems that JACK's latency is double it's buffer size, no matter if PulseAudio is connected or not. But wait, it's logical! The loopback signal goes through JACK twice. Buffering is applied at capture and at playback, and by default both buffers have size [frames * periods]. Check with command jack_lsp -l. Optionally, extra input and/or output latency can be added, however this does not reflect in my measurements.
Apart from the effect that JACK's latency may be different from what you'd expect, there is the effect that Pd + internet video requires more buffering than Pd only. It's a pity that JACK's bufsize can not be set in runtime.
It seems reasonable to expect and accept increased latency if you want to play internet video's etc. together with Pd. Switching between setups would be scriptable to make it easier (also see http://gareus.org/wiki/qjackctl_dbus). But for the moment, I even get stuck many times when switching 'by hand'. Apparently, the order of operations is very critical. If it goes wrong, getting the d-bus error from JACK I haven't found another option than kill the jackdbus process and try again.
Katja