Dsnoop and EAGAIN Handling
Jacob-Bishop opened this issue · 0 comments
Describe the bug
Thanks for this excellent piece of software. I have a working sound pipline using alsa loop, that goes audio source -> alsa plug pcm -> dmix -> loop in -> loop out -> plug -> snapcast server. However, I tried adding a dsnoop pcm in between the loop_out and plug pcms, but doing so causes clicking noises in the audio stream. It's not entirely clear to me whether fault here lies with alsa, snapcast, or my settings.
-
Digging through your code, it looks like this is happening due to your handling of EAGAIN
snapcast/server/streamreader/alsa_stream.cpp
Line 312 in 86cd4b2
-
I tried increasing the snapcast buffer to 1000 ms (from 10 ms, I'm on a wired connection). I also tried increasing the number of fragments to 8. Neither seemed to help. On the alsa side, I tried increasing the period_size and buffer size to 2048/8092. This helped somewhat, but didn't solve the issue. Are there other settings on either the snapcast or alsa side that I should be adjusting?
Environment details
- OS: Linux, 6.6.7-arch1-1
- Snapcast version 0.25.0, installed binary from github release
- Hardware: Fairly beefy X86_64 CPU, I don't think processing power is the issue?