Fix leaky stream on channel switch bug

This commit is contained in:
Adriano Caloiaro 2023-06-20 16:26:48 -06:00
parent 49bd57592e
commit 107fca6ee8
No known key found for this signature in database
GPG key ID: C2BC56DE73CE3F75

View file

@ -45,6 +45,7 @@ func Play(ctx *context.AppContext, stream io.ReadWriter, playbackLatency int) (e
func Stop(ctx *context.AppContext) {
ctx.IsPlaying = false
if ctx.Player != nil {
ctx.AudioStream.Close()
ctx.Player.Close()
}
}