[pulseaudio-discuss] Delays and strange transfer rate on network playback

Stanisław Pitucha viraptor at gmail.com
Sat May 12 14:37:53 PDT 2012


Hi all,
I'm trying to setup my xubuntu machine to play through the speakers
connected to TonidoPlug via some no-brand usb sound card. This mostly
works, but I have some issues I'd like to correct if there's a way to
do that. Right now means:
- I can play music from banshee without any issues
- I can play sound from a movie from mplayer with slight buffering
issue which doesn't bother me much (video slows down, audio seems to
start after a moment, then video catches up and they continue in sync
- all happens within the first second or two of playback, then
everything's fine)

What I have problems with is sound from browser / flash playing an mp4
file. While it works, it's really jittery and actually the jitter
affects also the video playback. I'd blame flash normally, but if I
switch the output during playback from remote pulseaudio to the local
one, it starts working smoothly again. Also changing fragment settings
from 4 / 25 to:
default-fragments = 8
default-fragment-size-msec = 5
made the playback slightly closer to what it should be (it's
constantly slightly skipping tiny bits, instead of having longer
play/pause fragments that I can hear) - I guess the values are fine
since I'm doing that on the local network anyway.

First potential issue I've noticed is that the destination system
doesn't seem to support any high-precision timers:
"pulseaudio[1962]: alsa-util.c: Disabling timer-based scheduling
because high-resolution timers are not available from the kernel."
But since mplayer can manage without much issues, I'd expect the sound
from flash to be comparable.

Second strange thing I noticed was when I had a quick look at the
actual transfer on the network. Wireshark claims that I'm sending
about 250kBps+ while playing sound. For a two channel playback... This
doesn't seem right. Even with default sampling of 44kHz * 2ch * 2B ==
176kBps of raw data. Even with protocol overhead I wouldn't expect
this to go over 200kBps. Transfer seems to have an uneven pattern of
7+ packets of max MTU (1500), then about the same number of short
60-70 bytes ones. Without much knowledge of the protocol, I can't say
if that's correct, but it definitely doesn't look healthy... - just
thought it's worth mentioning in case it indicates some real issue.

Is there something specific I should check? Anything I could try that
may improve playback from flash? Thanks for any ideas.

Client side pulseaudio: 1.1-0ubuntu15
Server side pulseaudio: 0.9.21-3+squeeze1 (this one I can't easily
update unfortunately), playing into alsa via snd-usb-audio.
Using the module-native-protocol-tcp module + discovery via zeroconf.

I added also resample-method = trivial in case it could reduce the
processing time - I don't think it had any effect.

-- 
KTHXBYE,

Stanisław Pitucha


More information about the pulseaudio-discuss mailing list