func initSonos(config *config.Config) *sonos.Sonos { var s *sonos.Sonos if dev := config.Lookup(CSWEB_DEVICE); nil != dev { s = sonos.Connect(dev, nil, sonos.SVC_CONTENT_DIRECTORY|sonos.SVC_AV_TRANSPORT|sonos.SVC_RENDERING_CONTROL) } else { log.Fatal("Could not create Sonos instance") } return s }
func initSonos(config *config.Config) *sonos.Sonos { var s *sonos.Sonos if dev := config.Lookup(CSWEB_DEVICE); nil != dev { reactor := sonos.MakeReactor(CSWEB_NETWORK, CSWEB_EVENTING_PORT) s = sonos.Connect(dev, reactor, sonos.SVC_CONTENT_DIRECTORY|sonos.SVC_AV_TRANSPORT|sonos.SVC_RENDERING_CONTROL) } else { log.Fatal("Could not create Sonos instance") } return s }