- b.Client = gumble.NewClient(b.Config)
- b.Client.Attach(gumbleutil.AutoBitrate)
- b.Client.Attach(&b)
- // Audio
- if os.Getenv("ALSOFT_LOGLEVEL") == "" {
- os.Setenv("ALSOFT_LOGLEVEL", "0")
- }
- if stream, err := gumbleopenal.New(b.Client); err != nil {
- fmt.Fprintf(os.Stderr, "%s\n", err)
- os.Exit(1)
- } else {
- b.Stream = stream
- }
-
- if err := b.Client.Connect(); err != nil {
- fmt.Fprintf(os.Stderr, "%s\n", err)
- os.Exit(1)
- }
-