Skip to content

sendspin never recovers from audio underflow #331

Backlog

Description

@YoshiWalsh

When I am using sendspin-python-cli, at some point eventually I encounter something like:

2026-11-29 05:09:19,192 DEBUG sendspin.audio: Sync error: 1.0 ms, buffer: 29.88 s, speed: 100.00%, played: 44100, inserted: 0, dropped: 0, callback: 82.9 µs
2026-11-29 05:09:19,198 DEBUG sendspin.audio: Gap: 0.0 ms filled with silence
2026-11-29 05:09:19,393 DEBUG sendspin.audio: Gap: 0.0 ms filled with silence
2026-11-29 05:09:19,565 DEBUG sendspin.audio: Gap: 0.0 ms filled with silence
2026-11-29 05:09:19,624 WARNING sendspin.audio: Audio underflow detected; requesting re-anchor
2026-11-29 05:09:19,691 INFO sendspin.audio: Cleared audio queue after underflow (deferred from audio thread)
2026-11-29 05:09:19,718 DEBUG sendspin.audio: Gap: 0.0 ms filled with silence
2026-11-29 05:09:19,723 INFO sendspin.audio: Stream STARTED: 3 chunks, 0.21 seconds buffered
2026-11-29 05:09:19,967 DEBUG sendspin.audio: Gap: 0.0 ms filled with silence

The issue is, on one of my devices, this causes all subsequent audio output to be silent. The visualiser keeps working, but no audio is output to my headphones/speakers. Pausing/resuming does not resolve this, the only solution I've found is to quit and restart the sendspin process.

The issue occurs very frequently if I'm using the sendspin player TUI (usually every ~3 minutes), but less frequently when using sendspin daemon (often only once an hour).

I can reproduce the issue by setting --audio-device to "default" (11) or "pipewire" (10). Both of these use 44.1kHz sample rates. I can not reproduce the issue if I ask sendspin to output to my audio device ("PCM2900C Audio CODEC Analog Stereo", audio device 12) directly, but when I do this I instead get very frequent audible stutters (multiple per second).

I believe this issue happens when my CPU is unable to run sendspin in real time. The stutters make sense, but the playback crashing entirely after an underflow seems like a bug. My PC is running Void Linux on an AMD 1800X, with an M-AUDIO M-TRACK DUO USB audio interface.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions