Skip to content

[bug] Player never reaches scheduled start time, audio buffer overflows and samples are dropped #272

Description

@Blacksoul87

Home Assistant Installation

Home Assistant Supervised

Home Assistant Details

latest

Music Assistant Installation

Home Assistant Add-on

Music Assistant Version

2.9.9

Multi-Room Audio Installation

Docker Standalone

Multi-Room Audio Version

5.2.2

Bug Description

Describe the bug

The player never starts playback because it appears to never reach the scheduled start time.

The audio buffer continuously fills until it overflows and the SDK starts dropping samples.

The log reports:

BUFFER OVERFLOW DETECTED: SDK is dropping samples because buffer is full and Read() isn’t consuming.
bufferedMs=18033,
targetMs=250,
isPlaybackActive=True,
totalDropped=184320,
overrunCount=123.

This indicates scheduled start time was never reached.

Playback remains active, but audio is never consumed from the buffer.


Environment

  • Image: ghcr.io/chrisuthe/multiroom-audio:dev
  • SDK Version: 9.1.0
  • Host: Proxmox VE 7.0.14-8
  • Docker running inside an LXC container
  • Debian LXC
  • USB audio devices passed through using ALSA (/dev/snd)

Audio devices:

ICUSBAUDIO7D
ICUSBAUDIO7D_1


Diagnostics

Sync

Sync Error: -4.67 ms
Status: Within tolerance
Playback Active: Yes

Buffer

Buffered: 18041 ms / 5000 ms
Overruns: 123
Dropped (Overflow): 184.3K
Fill Level: 100%

Clock

Clock synchronized: Yes
NTP: Active

The host system time is synchronized and the LXC container reports correct UTC time.


Expected behavior

The player should reach the scheduled start time, begin consuming audio from the buffer and maintain the configured target buffer.


Actual behavior

The scheduled start time is apparently never reached.

The player keeps buffering audio until the buffer is completely full, after which the SDK starts dropping samples because Read() never consumes data.


Additional information

The problem occurs consistently.

There are no ALSA errors.

The USB audio devices are detected correctly inside the container.

System time and monotonic clock appear to be working correctly.

The log message suggests the SDK itself believes playback never transitions into the scheduled playback state.

Any ideas on what could prevent the scheduled start time from being reached?

Steps to Reproduce

Play sound

Expected vs Actual Behavior

healthy not overflow

Diagnostics File

BUFFER OVERFLOW DETECTED: SDK is dropping samples because buffer is full and Read() isn't consuming. bufferedMs=18795, targetMs=250, isPlaybackActive=True, totalDropped=110592, overrunCount=116. This indicates scheduled start time was never reached.

Relevant Logs (optional)

No response

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions