Skip to content

Commit

Permalink
fix: always report when alsa driver output loop exists
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
devgianlu committed Nov 6, 2024
1 parent f2a2756 commit 08e546e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions output/driver_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 08e546e

Please sign in to comment.