0.4.0 (sendspin-cpp v0.9.5): Lost sync every 10 s on Raspberry Pi 3B while host clocks slew — please release with sendspin-cpp#208
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 35/100
Direção de pesquisa
Start by reading Sendspin/sendspin-cpp#208, which the report identifies as the relevant clock fix, then inspect how this CLI project selects and releases its sendspin-cpp dependency. Confirm whether the release build includes that change; done means a CLI release with the fix that the reporter can retest on the same hardware.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Summary
On two Raspberry Pi 3B players, sendspin-cli 0.4.0 (sendspin-cpp v0.9.5) logs Lost sync many times a minute, and each correction is an audible dropout. Most corrections are about 5 ms, and a larger one (50–100 ms) comes every 10 s exactly. The pattern does not depend on the output backend, the buffer size or the DAC. On the same Pis, with the same server and the same streams, the Python reference client (sendspin 8.0.0) plays cleanly.
The trigger looks like the one Sendspin/sendspin-cpp#208 describes: the hosts' clocks were being slewed hard by their time daemons. #208 was merged on 2026-10-17, after v0.9.5 (2026-10-14) and after cli v0.4.0 (2026-10-15), so this build does not have it. Could a cli release with sendspin-cpp ≥ #208 be cut? I'm happy to retest it on the same hardware.
Setup
| Player hardware | Raspberry Pi 3B Rev 1.2, Raspberry Pi OS Trixie arm64, kernel 6.18 (rpt) |
| Outputs tested | HiFiBerry Digi2 Pro (WM8804, S/PDIF), HiFiBerry DAC2 HD (PCM1796); a second Pi with an Amp3 has the same software |
| Player | sendspin-cli 0.4.0, sendspin-cpp v0.9.5, release binary |
| Server | Music Assistant 2.10.7 (aiosendspin) on an x86 host on the same wired LAN |
| Network | Wired, ping 0.5 ms average, no loss, under 3 ms max over 150 pings |
| Load on the Pi | ~0.5 % CPU, no throttling (get_throttled=0x0), ~47 °C |
What the log shows
At 96 kHz, 250 ms buffer, Digi2 Pro, ALSA hw: output: 77 Lost sync in about 5 minutes, in two groups:
W sendspin.sync_task: Lost sync (5139us off)
W sendspin.sync_task: Lost sync (5115us off)
W sendspin.sync_task: Lost sync (5021us off)
W sendspin.sync_task: Lost sync (78618us off) <- every 10 s
W sendspin.sync_task: Lost sync (5005us off)
...
W sendspin.sync_task: Lost sync (78360us off) <- 10.0 s later
...
W sendspin.sync_task: Lost sync (69714us off) <- 10.0 s later
Each one is followed by Regained sync almost at once. No underruns are logged.
What changed and what didn't
| Change | Result |
|---|---|
| 96 kHz → 48 kHz | Fewer small corrections; the ~90 ms ones every 10 s remain |
buffer-ms 250 → 100 |
Worse: a ~5 ms correction about every second, plus a ~50 ms one every 10 s. The large offset scales with the buffer (~50 ms at 100, ~80–90 ms at 250) |
ALSA hw: → -o portaudio |
Fewer small corrections; the 10 s ones remain |
| Digi2 Pro → DAC2 HD (different card, own clock oscillators) | No change |
Python sendspin 8.0.0 on the same Pi, card, server and stream (PortAudio) |
Clean, by ear over several tracks |
Measured from /proc/asound/.../status over 20–60 s, the card's hw_ptr advanced 0.14–0.45 % slower than nominal, and the figure varied between windows. That looks like output restarts or pauses from the corrections, not a slow crystal.
The clock situation (likely trigger)
While this happened:
- the server host's
systemd-timesyncdwas pinned at +500 ppm (max slew), with the clock 314 ms behind its source and stepped back 15 times in 3 days; - the Pi's timesyncd reported 0.9 s offset with 677 ms jitter.
The LAN's NTP source (a router) had an unstable clock. With chrony on both machines and internet time sources, the clocks are now steady, but the cpp player still showed the 10 s corrections (chrony was still slewing out a few hundred ms at the time). The Python client uses aiosendspin, which timestamps on CLOCK_MONOTONIC_RAW. That would explain why it was unaffected, and it matches #208's description.
Possibly related: #32 (continuous Lost sync on -o pulse, no underruns).
Config used
name = <player>
output = hw:CARD=sndrpihifiberry,DEV=0 # also tried: portaudio
buffer-ms = 250 # also tried: 100
fixed-volume = true
Happy to provide full logs, or to test a pre-release build.
- Linguagem predominante
- C++
- Estrelas
- 18
- Forks
- 7
- Merge médio
- 1d 12h
- PRs com merge (30d)
- 26
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de Sendspin/sendspin-cpp-cli
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Sendspin/sendspin-cpp-cli#111 ·
Mantenedores costumam responder em até 1 dia
-
Feature request: keep the ALSA output running briefly between streams (--keep-output-alive <s>)Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 42/100
Sendspin/sendspin-cpp-cli#109 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
Sendspin/sendspin-cpp-cli#108 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 62/100
Sendspin/sendspin-cpp-cli#106 ·
Mantenedores costumam responder em até 1 dia
-
Idle CPU: a fixed 10 ms main loop, and a PulseAudio stream that stays open after the stream endsAberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 42/100
Sendspin/sendspin-cpp-cli#92 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de Sendspin/sendspin-cpp-cli
Issues semelhantes
-
Linux npm packaging leaves workspace files that block subsequent CI checkoutTalvez já em andamento @Spockkk0225 assumiu hoje. Abertaci
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 73/100
alibaba/neug#1195 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 3 dias
-
QA/No release-notes/exclude tests tests/missing-coverage tests/test-quality
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 71/100
brave/brave-browser#61019 ·
Mantenedores costumam responder em até 1 dia
-
? - Needs Triage bug CUTLASS C++
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 4 dias