Persist microphone mute and volume settings
This commit is contained in:
committed by
Brandon McGinty
parent
aa38c99aab
commit
4497d41077
@@ -315,6 +315,9 @@ func (b *Barnard) OnMicVolumeDown(ui *uiterm.Ui, key uiterm.Key) {
|
||||
}
|
||||
b.Stream.SetMicVolume(-0.1, true)
|
||||
b.UserConfig.SetMicVolume(b.Stream.GetMicVolume())
|
||||
if err := b.UserConfig.SaveConfig(); err != nil {
|
||||
b.AddOutputLine("Microphone: could not save volume: " + err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Barnard) OnMicVolumeUp(ui *uiterm.Ui, key uiterm.Key) {
|
||||
@@ -323,6 +326,9 @@ func (b *Barnard) OnMicVolumeUp(ui *uiterm.Ui, key uiterm.Key) {
|
||||
}
|
||||
b.Stream.SetMicVolume(0.1, true)
|
||||
b.UserConfig.SetMicVolume(b.Stream.GetMicVolume())
|
||||
if err := b.UserConfig.SaveConfig(); err != nil {
|
||||
b.AddOutputLine("Microphone: could not save volume: " + err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Barnard) OnQuitPress(ui *uiterm.Ui, key uiterm.Key) {
|
||||
|
||||
Reference in New Issue
Block a user