From 08e546e4953b29afdc5b2753f37e79748db4aa17 Mon Sep 17 00:00:00 2001 From: devgianlu Date: Wed, 6 Nov 2024 11:56:07 +0100 Subject: [PATCH] fix: always report when alsa driver output loop exists The player manage loop requires for the driver to notify anytime the output loops stops, whether it is by an error or not (e.g. EOF). --- output/driver_unix.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/output/driver_unix.go b/output/driver_unix.go index 181c266..6999a59 100644 --- a/output/driver_unix.go +++ b/output/driver_unix.go @@ -182,11 +182,8 @@ func (out *output) setupPcm() error { // (Pause() or Close()) or there is an error. pcmHandle := out.pcmHandle go func() { - err := out.outputLoop(pcmHandle) - if err != nil { - out.err <- err - _ = out.Close() - } + out.err <- out.outputLoop(pcmHandle) + _ = out.Close() }() return nil