From 107fca6ee8144afdd5ca5e3527d6d62644145218 Mon Sep 17 00:00:00 2001 From: Adriano Caloiaro Date: Tue, 20 Jun 2023 16:26:48 -0600 Subject: [PATCH] Fix leaky stream on channel switch bug --- player/player.go | 1 + 1 file changed, 1 insertion(+) diff --git a/player/player.go b/player/player.go index 01d9c7c..2ee03fd 100644 --- a/player/player.go +++ b/player/player.go @@ -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() } }