Josvds
Posts: 18
Joined: Thu Oct 29, 2015 9:04 pm

PulseAudio server latency

Sun Dec 06, 2015 3:14 pm

I have setup three devices with pulseaudio.
The goal is to send audio from one to two devices.
Only i can`t get the devices in sync, there is lot of latency.
Someone tips? Below my config.

Sender
From this device the audio go`s to the two receivers.

/etc/pulse/default.pa

Code: Select all

# Audio-server
load-module module-native-protocol-unix
load-module module-suspend-on-idle timeout=1
load-module module-null-sink sink_name=rtp1 format=s16be channels=1 rate=44100 sink_properties="device.description='rtp1'"
load-module module-rtp-send source=rtp1.monitor loop=0
Receivers
Those two devices have the same configuration. The audio is received but far from sync (4 seconds).

/etc/pulse/default.pa

Code: Select all

# Audio-Client
load-module module-rtp-recv sap_address=10.10.10.51
/etc/pulse/daemon.conf

Code: Select all

# Audio-Client
log-level = info
exit-idle-time = -1
resample-method = src-sinc-fastest
default-sample-rate = 44100

Josvds
Posts: 18
Joined: Thu Oct 29, 2015 9:04 pm

Re: PulseAudio server latency

Wed Dec 09, 2015 10:00 pm

I now have tested three methods and all of the have some latency.
One more then the other.

Option A and B are much like each other.
- Two clients (in virtualbox) on desktop is very small latency echo
- One client in virtualbox and one rasberry pi is latency about 1~2 seconds

Option C
- Depending on what client is starting first latency about 2~4 seconds.


///// OPTION A \\\\\

#
# Client
#

Code: Select all

apt-get install pulseaudio pulseaudio-module-zeroconf alsa-utils avahi-daemon

/etc/pulse/default.pa
load-module module-rtp-recv sap_address=10.10.10.51
#load-module module-suspend-on-idle

/etc/pulse/daemon.pa
log-level = info
exit-idle-time = -1
resample-method = src-sinc-fastest
default-sample-rate = 44100
#
# Server
#

Code: Select all

apt-get install pulseaudio pulseaudio-module-zeroconf alsa-utils avahi-daemon

/etc/pulse/default.pa
load-module module-null-sink sink_name=rtp1 format=s16be channels=2 rate=44100 sink_properties="device.description='rtp1'"
load-module module-rtp-send source=rtp1.monitor loop=0 destination=10.10.10.51
load-module module-null-sink sink_name=rtp2 format=s16be channels=2 rate=44100 sink_properties="device.description='rtp2'"
load-module module-rtp-send source=rtp2.monitor loop=0 destination=10.10.10.52
load-module module-combine-sink sink_name=combined slaves=rtp1,rtp2 channels=4
set-default-sink combined

/etc/pulse/daemon.pa
log-level = info
exit-idle-time = -1
resample-method = src-sinc-fastest
default-sample-rate = 44100
///// OPTION B \\\\\

#
# Client
#

Code: Select all

apt-get install pulseaudio pulseaudio-module-zeroconf alsa-utils avahi-daemon

/etc/pulse/default.pa
load-module module-rtp-recv
#
# Server
#

Code: Select all

apt-get install pulseaudio pulseaudio-module-zeroconf alsa-utils avahi-daemon

/etc/pulse/default.pa
load-module module-native-protocol-unix
load-module module-suspend-on-idle timeout=1
load-module module-null-sink sink_name=rtp
load-module module-rtp-send source=rtp.monitor rate=48000 channels=2 format=s16be
///// OPTION C \\\\\

#
# Client
#

Code: Select all

apt-get install pulseaudio pulseaudio-module-zeroconf avahi-daemon dbus-x11

load-module module-udev-detect tsched=0
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;10.10.10.0/24 auth-anonymous=1
load-module module-zeroconf-publish
#
# Server
#

Code: Select all

apt-get install pulseaudio pulseaudio-module-zeroconf avahi-daemon dbus-x11

load-module module-native-protocol-unix
load-module module-suspend-on-idle timeout=1
load-module module-tunnel-sink server=10.10.10.51 sink_name=a
load-module module-tunnel-sink server=10.10.10.52 sink_name=b
load-module module-combine-sink sink_name=combined slaves=a,b
set-default-sink combined

Josvds
Posts: 18
Joined: Thu Oct 29, 2015 9:04 pm

Re: PulseAudio server latency

Sun Dec 20, 2015 4:26 pm

I downloaded and installed Logitech Media Server.
http://www.mysqueezebox.com/download

Configured two folders on my disk with audio files.

I did download the RPI version (1 and 2) for my two PI`s.
https://sites.google.com/site/picoreplayer/home

In the web page of logitech media server i selected synchronize in the right top corner. The music is comming synced out of the speakers..

Now i`m going to look for a way to send audio from the desktop device trough the speakers without logitech media server because at the end i would like t use it for the sound on my PC as well for the movies.

Return to “Advanced users”