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

audio stutters after several minutes of streaming #133

Open
CHNtentes opened this issue May 12, 2024 · 3 comments
Open

audio stutters after several minutes of streaming #133

CHNtentes opened this issue May 12, 2024 · 3 comments
Labels
question Further information is requested

Comments

@CHNtentes
Copy link

Hi,
First of all, I want to thank you for your great work. I only expected it would be suitable for music, but it turns out that the latency is enough for video/gaming.
However, there is an issue: Every time I start streaming the audio is fine, but after some time (I would say about 10-20 minutes) , the audio begins to stutter and crack a lot. Then if I restart streaming it would work well again.
Is there any tip you could show me about this issue? I stream to a Sonos Era 100 btw.

@dheijl
Copy link
Owner

dheijl commented May 12, 2024

Is your Sonos wired or is it a WiFi connection?
Also, if you're gaming I can imagine that swyh-rs does not get enough CPU to keep up with the audio capturing. You can always try to give it a higher priority in the task manager.

@CHNtentes
Copy link
Author

Thanks for your reply.
There's no wired connection, I just connect my Sonos and PC to same Wi-Fi.
I tried to set swyh program to realtime priority in task manager, but the issue remains.
Even when I'm gaming, the CPU usage usually is less than 30%.
Could my network connection quality have something to do with this?

@dheijl
Copy link
Owner

dheijl commented May 13, 2024

This leaves 2 possibilities that I can see:

  • your wireless network is sometimes too busy, but why only after 20 minutes or so beats me

  • the sample clock of your Sonos runs slightly faster than the sample clocck of your PC, so that inevitably after a certain time the Sonos network delay buffer will get empty because the samples arrive slower than they are consumed, and restarting the music fixes it temporarily.

Edit: from 1.10.5 on you can also let swyh-rs do some buffering, what happens if you enable let's say a 100 msec buffer? Does the time before stuttering begins increase?

@dheijl dheijl added the question Further information is requested label May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants