From 237146b97c465db7c9097e30ba7d6496a4bff918 Mon Sep 17 00:00:00 2001 From: Daniel Ponte Date: Thu, 8 Aug 2024 19:24:33 -0400 Subject: [PATCH] Reopening the oto context causes a crash on linux pipewire Fix the logic error that caused this --- cmd/calls/audio.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/calls/audio.go b/cmd/calls/audio.go index d51ad70..443428c 100644 --- a/cmd/calls/audio.go +++ b/cmd/calls/audio.go @@ -41,6 +41,9 @@ func (p *Player) initOto(samp, channels int) error { if p.ctx, err = oto.NewContext(samp, channels, 2, 1024); err != nil { return err } + + p.sampleRate = samp + p.channels = channels } return nil