Reopening the oto context causes a crash on linux pipewire
Fix the logic error that caused this
This commit is contained in:
parent
a7acacda15
commit
237146b97c
1 changed files with 3 additions and 0 deletions
|
@ -41,6 +41,9 @@ func (p *Player) initOto(samp, channels int) error {
|
||||||
if p.ctx, err = oto.NewContext(samp, channels, 2, 1024); err != nil {
|
if p.ctx, err = oto.NewContext(samp, channels, 2, 1024); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p.sampleRate = samp
|
||||||
|
p.channels = channels
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue