Replies: 2 comments
-
|
Thanks for the post. TBH this looks more like an Issue. Would you be kind enough to file it as an Issue and we can try to address it there? Thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
YES |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I am encountering persistent "Large negative (early) sync errors" while running Shairport Sync on an ARM64 platform . The errors report drifts of approximately -0.1s to -0.3s, occurring frequently during playback.
Environment
OS: Ubuntu 22.04
Shairport Sync Version: 4.3.7-OpenSSL-Avahi-ALSA-pa-stdout-soxr-metadata-dbus-mpris-sysconfdir
Output Backend: ALSA (via snd-aloop loopback device)
Configuration Details
The output is directed to a virtual ALSA device defined in .asoundrc which performs sample rate conversion from 44.1 kHz to 48 kHz using the plug plugin:
ALSA Configuration:
Plaintext
pcm.channel_2_airplay {
type plug
slave {
pcm "hw:Loopback,0,2"
rate 48000
format S16_LE
channels 2
}
}
Shairport Sync Relevant Config:
general = {
interpolation = "basic";
resync_threshold_in_seconds = 0.1;
audio_backend_buffer_desired_length_in_seconds = 0.5;
};
alsa = {
output_device = "channel_2_airplay";
output_rate = 44100;
output_format = "S16_LE";
};
Logs
Plaintext
Apr 16 20:48:43 shairport-sync[22065]: "player.c:2908" Large negative (i.e. early) sync error of -13622 frames (-0.308889 seconds).
Apr 16 20:48:44 shairport-sync[22065]: "player.c:2908" Large negative (i.e. early) sync error of -5443 frames (-0.123424 seconds).
Apr 16 20:48:44 shairport-sync[22065]: "player.c:2908" Large negative (i.e. early) sync error of -12708 frames (-0.288163 seconds).
Observations
The error occurs specifically when using the plug device over hw:Loopback.
The "early" sync error suggests that the ALSA backend is consuming frames faster than the calculated clock, or the loopback device timing is not providing the expected backpressure/delay.
Increasing audio_backend_buffer_desired_length_in_seconds to 0.5s did not resolve the sync instability.
Steps to Reproduce
Configure an ALSA loopback device with a plug layer converting 44.1k to 48k.
Set output_device in Shairport Sync to this plug device.
Start playback and monitor the logs for "Large negative sync error".
Question
Is this likely caused by the timing characteristics of snd-aloop when combined with ALSA's software rate conversion, and are there recommended alsa backend settings (like disable_mmap or specific period/buffer settings) to stabilize synchronization in this scenario?
Beta Was this translation helpful? Give feedback.
All reactions