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

snapserver buffer below 400ms #329

Closed
deisi opened this issue Dec 20, 2017 · 6 comments
Closed

snapserver buffer below 400ms #329

deisi opened this issue Dec 20, 2017 · 6 comments

Comments

@deisi
Copy link

deisi commented Dec 20, 2017

It is not possible to set a snapserver buffer below 400ms. A value below 400ms gets ignored and is relpaced by 400ms.

Start the server with:

snapserver -s "pipe:///tmp/snapfifo?name=default&mode=read&codec=pcm&sampleformat=48000:16:2" -b 200

And on the client one gets:

Dec 21 21:15:03 serv snapclient[940]: 2017-12-21 21-15-03 [Info] ServerSettings - buffer: 400, latency: 0, volume: 100, muted: 0

ah I found where this is hardcoded but why:

#if defined(HAS_AVAHI) || defined(HAS_BONJOUR)
PublishZeroConf publishZeroConfg("Snapcast");
publishZeroConfg.publish({mDNSService("_snapcast._tcp", settings.port), mDNSService("_snapcast-jsonrpc._tcp", settings.controlPort)});
#endif
if (settings.bufferMs < 400)
settings.bufferMs = 400;
asio::io_service io_service;

@badaix
Copy link
Owner

badaix commented Mar 12, 2020

it's basically to avoid bug reports saying that the client doesn't play audio. Maybe i will allow smaller buffers and log a warning.

@badaix badaix closed this as completed Mar 12, 2020
@deisi
Copy link
Author

deisi commented Mar 13, 2020

As the minimum required buffer is out of the scope of snapcast, it should be left to the user to try and decide what works for his/her setup and situation. I would very much appreciate a change here :)

@vroland
Copy link

vroland commented Mar 31, 2020

@badaix I second this. Maybe at least make it configurable during build time for experienced users?

@zaneclaes
Copy link

Would really appreciate this, as well. My setup appears to be able to handle much smaller buffers (everything is 1gbps ethernet with RCA cables; no wifi or bluetooth). As it stands, I cannot use snapcast for streaming live music playing as the 400ms delay is too large, but I suspect ~100-200ms would be fine.

@mbrgm
Copy link

mbrgm commented Dec 14, 2021

it's basically to avoid bug reports saying that the client doesn't play audio. Maybe i will allow smaller buffers and log a warning.

@badaix PR welcome for this?

@badaix
Copy link
Owner

badaix commented Dec 14, 2021

I can lower it to let's say 50ms in the next release

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

No branches or pull requests

5 participants