Skip to content

Compensate with additional packets when being late during streaming #1061

@postlund

Description

@postlund

Short feature/function description
Currently, in RAOP, packets are evenly distributed over time. Due to the naïve implementation and not having good enough real time scheduling to rely on, the streaming always lags behind and eventually the receiver stops playing due to underflow of packets. A simple solution to this is to compare how many packets that have been sent to how many packets that should have been sent and send some additional packets to (hopefully) catch up.

What needs to be done?

  • Calculate a diff of how many packets we are currently behind
  • Send some packets based on how many packets that we are behind (behind/FRAMES_PER_PACKET), but use an upper limit of three to not overcompensate too much

Is this a breaking change?
No

Anything else worth knowing?
Sub-task of #1059

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions