diff --git a/device/alsa/alsa.go b/device/alsa/alsa.go index 7dab252f..ae7109b3 100644 --- a/device/alsa/alsa.go +++ b/device/alsa/alsa.go @@ -436,10 +436,10 @@ func (d *ALSA) Read(p []byte) (int, error) { switch err { case nil, io.EOF: d.l.Log(logger.Debug, pkg+"EOF") - return 0, nil + return n, nil default: d.l.Log(logger.Error, pkg+"unexpected error from Read", "error", err.Error()) - return 0, nil + return n, nil } } d.l.Log(logger.Debug, fmt.Sprintf("%v read %v bytes", pkg, n))