Page 1 of 1

Sonos controller

Posted: October 17th, 2019, 11:10 pm
by skidoo
Thinking about very basic Sonsos support with Jean-Luc Barrière's https://github.com/janbar/noson C++ library for MPD. Speakers play MPDs http stream and volume control. What is the correct way of implementing such a thing? Standalone output plugin or httpd mixer?

Re: Sonos controller

Posted: October 18th, 2019, 6:53 am
by max
I don't see any documentation. The library API is synchronous and thus cannot be integrated in MPD's event loop; this will cause a lot of trouble. And the library creates threads, which is not a good thing for a library to do. I don't like the library.

Re: Sonos controller

Posted: October 18th, 2019, 12:32 pm
by skidoo
I don't see any documentation.
Example programs are documentation according to Mr. Barrière :(

The library API is synchronous and thus cannot be integrated in MPD's event loop; this will cause a lot of trouble. And the library creates threads, which is not a good thing for a library to do.
Ok, made a quick and dirty httpd_mixer. Not suitable for public consumption but plays some music in my kitchen. But how to do it right? Handcrafted with love and boost.Asio? Output oder mixer? Or a new controller class for Chromecast, Musicast, Snapcast and Sonos? Kindly asking for advice.

Re: Sonos controller

Posted: October 19th, 2019, 8:39 am
by max
skidoo wrote:
October 18th, 2019, 12:32 pm
Ok, made a quick and dirty httpd_mixer. Not suitable for public consumption but plays some music in my kitchen. But how to do it right? Handcrafted with love and boost.Asio? Output oder mixer? Or a new controller class for Chromecast, Musicast, Snapcast and Sonos? Kindly asking for advice.
If you have code, send it as a PR and then we discuss it on GitHub. Right now, I can't imagine what you've been doing, so let's see some code. Even if it's bad code and not "suitable for public consumption". Maybe I can give you directions then.

Re: Sonos controller

Posted: October 20th, 2019, 11:02 pm
by skidoo
You have been warned ;) PR is on its way.