Deactivate OpenAL context before destroying it

This commit is contained in:
Brandon McGinty (chatgpt)
2026-08-09 12:58:00 -04:00
committed by Brandon McGinty
parent 27e8fc7232
commit e1d8cad061
+4 -1
View File
@@ -302,7 +302,10 @@ func (s *Stream) Destroy() {
}
if s.deviceSink != nil {
if s.contextSink != nil {
s.render(func() { s.contextSink.Destroy() })
s.render(func() {
openal.NullContext.Activate()
s.contextSink.Destroy()
})
close(s.renderCh)
<-s.renderDone
s.contextSink = nil