layeh / gumble

gumble is a Mumble client implementation in Go (golang)
https://pkg.go.dev/mod/layeh.com/gumble
Mozilla Public License 2.0
173 stars 53 forks source link

the opus can not work well when using gumble. #54

Closed dextercai closed 4 years ago

dextercai commented 4 years ago

I am using the gumble to create a client. But the opus can not work well. My server shows : CELT codec switch 0x8000000b 0x80000010 (PreferAlpha true) (Opus false) But I tried layeh/barnard, It works well.

I using a struct and func like that in barnard

type Client struct {
    Config *gumble.Config
    Client *gumble.Client
    Address   string
    TLSConfig tls.Config
    Stream *gumbleopenal.Stream
}
func (b *Client) start() {
    b.Config.Attach(gumbleutil.AutoBitrate)
    b.Config.Attach(b)

    var err error
    _, err = gumble.DialWithDialer(new(net.Dialer), b.Address, b.Config, &b.TLSConfig)
    if err != nil {
        AddSystemLog(err.Error())
        return
    }

    // Audio
    if os.Getenv("ALSOFT_LOGLEVEL") == "" {
        os.Setenv("ALSOFT_LOGLEVEL", "0")
    }
    if stream, err := gumbleopenal.New(b.Client); err != nil {
        AddSystemLog(err.Error())
        os.Exit(1)
    } else {
        b.Stream = stream
    }
}

If I call StartSource(), I cant see any network flow.