Skip to content

Intermittent Wifi noise not measurable #156

Closed

Description

@kahrendt

Measuring required_lead_time and min_buffer accurately is still really challenging despite adding the server_transmitted field to stream/start and stream/clear. That gives a few data points, but the type of interruptions in low latency will almost never get captured by that info.

I was measuring my wifi environment (single family home, so not a dense apartment complex and relatively quiet RF wise) for some unrelated to Sendspin projects. I do have a doorbell camera that uses wifi, and on that channel is it will take over the air time 300ms+ at a time roughly every 5 minutes. We don't start and clear streams frequently enough to capture that, let alone capture it enough to assume it isn't an outlier. So on that wifi channel, all my measurements based on the stream/start ~100 ms or so, but in practice, every 5 minutes I will get a drop out. On another wifi channel (using my other AP), I have a neighbor's whose AP does a slow broadcast which interferes 100 to 200 ms every minute. This is the quieter channel and that signal is weak, but it will still cause disruptions. Again unless I get lucky and capture a stream/start or stream/clear at that window, I won't have any insight into it.

Two possible options that I can see:

  1. Use buffer underflows as my own single the buffer needs to increase. Easiest, but also the most misleading because not every underflow is due to network conditions (i.e., an OTA update check happens and slows us down for a long duration; that isn't typical and shouldnt' delay the latency for every client).
  2. Timestamp every binary audio chunk with the server's sent timestamp. I can then gather the statistics with a lot of data points and model it much better.

We should also consider allowing or even mandating using Opus for low latency streaming because clients can use Opus's native packet loss concealment to smooth out a small disruption. That's a big ask though...\

Activity

  1. self-assigned this
    on Aug 19, 2026
  2. maximmaxim345 commented on Aug 19, 2026

    @maximmaxim345
    Member

    Music Assistant/aiosendspin can detect if a client implements other hard breaking changes and know if it is implementing the newer binary message format with timestamps.

  3. kahrendt commented on Aug 19, 2026

    @kahrendt
    ContributorAuthor

    Add the sent timestamp to the binary message, option 2

  4. moved this from Next to In Progress in Sendspin Project Boardon Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions