Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pulse audio build player sync problems at start of track #155

Open
pssc opened this issue Nov 10, 2021 · 14 comments
Open

pulse audio build player sync problems at start of track #155

pssc opened this issue Nov 10, 2021 · 14 comments

Comments

@pssc
Copy link

pssc commented Nov 10, 2021

Using the PA build rather than the alas build player sync seems to be broken on every track change,
The scenario currently is PA build and Radio.

This was discovered when I switched the Home assistant Addon to use the Pulse Audio build to work round issues found with sound quality pssc/ha-addon-squeezelite#1 .

I am adding some instrumentation and extra debug to my local PA build, I believe this is may be an upstream issue, so of the sync calculation code looks a little suspect after review and reading the PA API.
I will try I few tweaks and experiments, is there anything you would like me to try?

If you have any insights they would be welcome, I will report further findings on this issue thread,

@ralph-irving
Copy link
Owner

User manison provided the native pulse audio support. I don't use it so don't really have anything to add.

@pssc
Copy link
Author

pssc commented Nov 10, 2021

Thanks I will continue looking into it and see what I can do.

@troffasky
Copy link

What is "broken" about sync? Does it wander out of sync on track change, or do you find that the player using Pulseaudio randomly goes silent at the beginning of tracks?

@pssc
Copy link
Author

pssc commented Nov 12, 2021 via email

@troffasky
Copy link

troffasky commented Nov 12, 2021

OK, "good", because I came here to log a bug about silence on track change and I'm glad it's not just me!
For me however, it's not every track change, it just seems to happen at random.

Desktop running Debian with pulseaudio + squeezelite, synced with Pi 0W running PiCorePlayer. It's the desktop that has the issue.
I have found that I can get audio to resume by skipping around in the track.

@troffasky
Copy link

When a track changes I see an event like
[20:52:37.915266] _output_frames:153 track start sample rate: 44100 replay_gain: 0
when it's working fine.
When a player decides to not bother playing the next track, there is no "track start" event logged.
I have player.sync log level set to Info but nothing nothing interesting is logged when tracks change.

@tmancill
Copy link

Adding a squeezelite+pulseaudio to my sync group causes issues for me as well, sometimes at the start of the track and rarely (but very annoyingly) shortly after the start of a track, causing the entire group to advance forward/jump around a few times. I have Logitech Squeezebox Booms, HiFiBerry devices running HiFiBerryOS (which is squeezelite under the hood, but doesn't exhibit the problem), and squeezelite+pulseaudio running on a laptop that shouldn't have any problem keeping up with the stream.

I'd be glad to help with testing @pssc .

@troffasky
Copy link

This doesn't seem to be a Pulseaudio issue, I killed pulseaudio and started squeezelite with -o default:CARD=Extigy and the silence on track change still occurs randomly.

@pssc
Copy link
Author

pssc commented Nov 18, 2021

@troffasky what build are you using?

@pssc pssc changed the title pulse audio player sync problems at start of track pulse audio build player sync problems at start of track Nov 18, 2021
@troffasky
Copy link

1.9.9-1386 on the Desktop

@adi1
Copy link

adi1 commented Feb 8, 2022

I just wanted to add to this, not sure if it's related.

The ALSA plugin works fine, track changes are instant, no sync problems.

In the pulseaudio build, manually changing tracks results in a long pause until the next track starts, around 8 seconds. During this delay, you can still hear the old track playing. If the tracks are not the same bit rate, it will be playing either too fast or too slow until the next track starts.

This only started happening when I got a new DAC, a TEAC UD-301. With my Audioengine D1 and with the built-in notebook sound card, the delay is much shorter, about 1 second, and there is no noticeable sync problem.

This happens on the version from git, currently v1.9.9-1398. The behaviour is identical to the one from my debian bullseye repo, v1.9.8-1317.

I'm just posting this in case it gives anyone ideas, since the issue is so pronounced on my TEAC DAC. If you'd like me to run some tests, just let me know and I'd be glad to help.

@pssc
Copy link
Author

pssc commented Feb 8, 2022 via email

@djtroyal
Copy link

@pssc Curious if you've made any headway on your sync/buffering issues? I am experiencing the same problem on the current pulse build.

@pssc
Copy link
Author

pssc commented Jun 24, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants