Merge pull request #12 from acaloiaro/fix-leaky-channel-stream-bug

Fix leaky channel stream bug
This commit is contained in:
Adriano Caloiaro 2023-06-20 16:42:29 -06:00 committed by GitHub
commit fee58c2c38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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()
}
}