Sonos controller

Discuss client development (or even MPD development if you feel so inclined), ask questions about the client libs, MPD feature requests from client developers, etc...
Post Reply
skidoo
Posts: 176
Joined: April 28th, 2013, 10:06 pm
Location: Western Germany

Sonos controller

Post by skidoo » October 17th, 2019, 11:10 pm

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?

max
Forum team
Posts: 953
Joined: January 15th, 2013, 3:43 pm

Re: Sonos controller

Post by max » October 18th, 2019, 6:53 am

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.

skidoo
Posts: 176
Joined: April 28th, 2013, 10:06 pm
Location: Western Germany

Re: Sonos controller

Post by skidoo » October 18th, 2019, 12:32 pm

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.

max
Forum team
Posts: 953
Joined: January 15th, 2013, 3:43 pm

Re: Sonos controller

Post by max » October 19th, 2019, 8:39 am

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.

skidoo
Posts: 176
Joined: April 28th, 2013, 10:06 pm
Location: Western Germany

Re: Sonos controller

Post by skidoo » October 20th, 2019, 11:02 pm

You have been warned ;) PR is on its way.

Post Reply