Serialize OpenAL playback on a dedicated thread
This commit is contained in:
committed by
Brandon McGinty
parent
0f2eb4408f
commit
8c0887d562
+3
-15
@@ -27,7 +27,7 @@ type Barnard struct {
|
||||
Address string
|
||||
TLSConfig tls.Config
|
||||
|
||||
Stream *gumbleopenal.Stream
|
||||
Stream *gumbleopenal.Stream
|
||||
Tx bool
|
||||
AutoTransmit bool // auto-start transmission on connect
|
||||
Connected bool
|
||||
@@ -136,13 +136,7 @@ func (b *Barnard) TreeItemKeyPress(ui *uiterm.Ui, tree *uiterm.Tree, item uiterm
|
||||
b.UserConfig.ToggleMute(u)
|
||||
}
|
||||
|
||||
if au := u.AudioSource(); au != nil {
|
||||
if u.LocallyMuted() {
|
||||
au.SetGain(0)
|
||||
} else {
|
||||
au.SetGain(u.Volume())
|
||||
}
|
||||
}
|
||||
b.Stream.UpdateUserGain(u)
|
||||
}
|
||||
|
||||
// Update channel mute state
|
||||
@@ -174,13 +168,7 @@ func (b *Barnard) TreeItemKeyPress(ui *uiterm.Ui, tree *uiterm.Tree, item uiterm
|
||||
if key == *b.Hotkeys.MuteToggle {
|
||||
// Toggle mute for single user
|
||||
b.UserConfig.ToggleMute(treeItem.User)
|
||||
if au := treeItem.User.AudioSource(); au != nil {
|
||||
if treeItem.User.LocallyMuted() {
|
||||
au.SetGain(0)
|
||||
} else {
|
||||
au.SetGain(treeItem.User.Volume())
|
||||
}
|
||||
}
|
||||
b.Stream.UpdateUserGain(treeItem.User)
|
||||
b.RebuildUserChannelTreePreservingSelection()
|
||||
b.Ui.Refresh()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user