music-assistant / hass-music-assistant

Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
Apache License 2.0
1.39k stars 51 forks source link

Sometimes doubled stream on airplay #2485

Closed FreyrPL closed 3 months ago

FreyrPL commented 5 months ago

What version of Music Assistant has the issue?

2.1.0b6

What version of the Home Assistant Integration have you got installed?

2024.5.1

Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

The problem

Sometimes after adding a track to the queue and playing it, the sound is duplicated with a certain delay. I have attached a recording from a voice recorder. The issue is repeatable, but hard to replicate consistently. Sometimes the queue starts correctly, and sometimes it doesn't. Once it does start, every track plays correctly. The problem persists regardless of the MA version, and has been occurring for at least a few months. DLNA works well, but sometims 'freezes' and doesn't work till amplifier reset, but that's a different issue.

How to reproduce

Just play track through airplay

Music Providers

Tidal, Remote Share, YT Music

Player Providers

Problem only appears on Airplay

Full log output

MA log.txt

https://github.com/music-assistant/hass-music-assistant/assets/94012672/8506e327-f450-495d-a165-47ed4f54f99c

Additional information

No response

What version of Home Assistant Core are your running

2024.6.2

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Generic x86-64 (e.g. Intel NUC)

OzGav commented 5 months ago

So I take it you are streaming direct to the Onkyo Amp?

P.S. Take a moment to fix your tags as well to avoid other unrelated problems!

marcelveldt commented 5 months ago

You have a very old version running. Can you start by updating to the latest stable or beta version ? We have had lots of bugfixes last couple of days and I fixed 2 for Airplay that may be related to this issue,

FreyrPL commented 5 months ago
  1. Yes. Directly to onkyo amp.
  2. Tagless tracks have to be tagged manually. This is low priority on my to-do list :)
  3. Version is dated 14.6.2024. 2.1.0b6. Log is short because it was generatad after recent update.Just didn't check after copy-paste. My bad.

edit: If i remember correctly, problem started after fixing buffer on airplay (muted first few seconds of the track)

marcelveldt commented 5 months ago

OK, We will need to reproduce this issue. Any clues when it happens ?

FreyrPL commented 5 months ago

No. I've tried to find any pattern but with no luck so far.

  1. No, i don't use automations. Just using MA interface.
  2. This is the only player i use. No groups.

It looks like this:

  1. Hit any track to play and it just happens sometimes.
  2. I need to clear queue and play different track. If it's ok, then i can back to the track played before. If not, repeat the step.
  3. If it's ok, then it works well through entire queue. I did not find any issues when jumping track-to-track on started queue, so flow mode is not connected with this case i guess.

Edit: Updated integration to 2024.6.2. Problem still exists

OzGav commented 4 months ago

There hasn’t been anything dedicated to this but could you check beta 15 and confirm this is still an issue.

FreyrPL commented 4 months ago

On 13 it was still there. I'll check 15 when i get home.

FreyrPL commented 4 months ago

I did not find any issues with doubled stream, BUT i did just a few tests, so the sample is not representative. Anyway my MASS just updated to 2.1

OzGav commented 4 months ago

Ok we will need your thoughts on whether this is still an issue. We can close it and reopen later if it comes back?

FreyrPL commented 4 months ago

Sure

FreyrPL commented 4 months ago

Update: On 2.1.0rc1 problem still exists. Steps:

  1. One track playing
  2. Clear queue (music stops)
  3. Play another track

In queue there is only "new" track, but music goes from both.

marcelveldt commented 4 months ago

This one should be fixed in 2.1.0 / 2.2.0b0

OzGav commented 3 months ago

@FreyrPL Closing assumed fixed. Please advise if not