get rid of deafened buffer

This commit is contained in:
aoife cassidy 2025-11-01 21:00:13 +01:00
parent 411401e2cd
commit 15740565d1
No known key found for this signature in database
GPG Key ID: 7184AC1C9835CE48
2 changed files with 6 additions and 6 deletions

View File

@ -73,9 +73,9 @@ func (au *Audio) ProcessInput(conn *ircevent.Connection, channel string) error {
}
empty := make([]float32, len(out))
if !au.Deafened {
select {
case str := <-au.OutBuffer:
if !au.Deafened {
raw, err := base64.StdEncoding.DecodeString(str)
if err != nil {
break
@ -83,10 +83,10 @@ func (au *Audio) ProcessInput(conn *ircevent.Connection, channel string) error {
if _, err = dec.DecodeFloat32(raw, out); err != nil {
break
}
}
default:
copy(out, empty)
}
}
})
if err != nil {
log.Printf("error opening input stream: %v", err)

View File

@ -215,7 +215,7 @@ func (m model) View() (s string) {
status = deafened
} else if user.isMuted {
status = muted
} else if user.lastSpoke.Add(time.Second * 2).After(time.Now()) {
} else if user.lastSpoke.Add(time.Millisecond * 100).After(time.Now()) {
status = speaking
nickStyled = nick
}