Fix leaky stream on channel switch bug
This commit is contained in:
parent
49bd57592e
commit
107fca6ee8
1 changed files with 1 additions and 0 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue