Fix latency with PulseAudio and simultaneous output #868
-
I have a setup here with a Ryzen 2400G PC with Ubuntu Desktop 20.04.2 and Kodi 19 installed. I installed the snapcast package and configured it:
PulseAudio is configured to have a combined sink, simultaneously playing back on the hardware speaker and snapcast server using:
Note that I didn't need to set This works okish. The sound from the system and Kodi is played back on the speaker and via snapcast / the snapdroid Android app on a mobile phone. What can I do to fix the latency? Would the Kodi Addon help me in any way? Might Ubuntu 21.04 improve this in any way? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Output from snapclient (like on your Android phone) is always going to have a variable delay because that's how snapcast works. The audio output on each snapcast client is matched to whichever client has the highest latency, and there will always be some latency because of buffering. The audio you're sending straight to your local sink will always get played with relatively low latency. The best fix might be to run snapclient on the server itself instead of sending anything directly to the hardware sink directly (i.e. don't use combined sink, but listen in to the snapcast sink using snapclient). |
Beta Was this translation helpful? Give feedback.
Output from snapclient (like on your Android phone) is always going to have a variable delay because that's how snapcast works. The audio output on each snapcast client is matched to whichever client has the highest latency, and there will always be some latency because of buffering.
The audio you're sending straight to your local sink will always get played with relatively low latency.
The best fix might be to run snapclient on the server itself instead of sending anything directly to the hardware sink directly (i.e. don't use combined sink, but listen in to the snapcast sink using snapclient).