b.UiTree.Rebuild()
b.Ui.Refresh()
- if b.Client.AudioEncoder().Bitrate() > e.MaximumBitrate {
- b.Client.AudioEncoder().SetBitrate(e.MaximumBitrate / 3)
- }
-
b.UpdateInputStatus(fmt.Sprintf("To: %s", e.Client.Self().Channel().Name()))
b.AddOutputLine(fmt.Sprintf("Connected to %s", b.Client.Conn().RemoteAddr()))
if e.WelcomeMessage != "" {
"github.com/layeh/barnard"
"github.com/layeh/barnard/uiterm"
"github.com/layeh/gumble/gumble"
+ "github.com/layeh/gumble/gumbleutil"
"github.com/layeh/gumble/gumble_openal"
)
}
b.Client = gumble.NewClient(&b.Config)
+ b.Client.Attach(gumbleutil.AutoBitrate)
b.Client.Attach(&b)
// Audio
if stream, err := gumble_openal.New(b.Client); err != nil {