From a0867331cb05529fb5b8ca0d52daebc46750fe44 Mon Sep 17 00:00:00 2001 From: Trek H Date: Tue, 1 Feb 2022 14:13:25 +1030 Subject: [PATCH] alsa: log number of bytes read --- device/alsa/alsa.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/device/alsa/alsa.go b/device/alsa/alsa.go index 62df0d5a..ee3cd353 100644 --- a/device/alsa/alsa.go +++ b/device/alsa/alsa.go @@ -431,7 +431,7 @@ func (d *ALSA) Read(p []byte) (int, error) { } // Read from pool buffer. - d.l.Log(logger.Debug, pkg+"getting next chunk ready") + d.l.Log(logger.Debug, pkg+"reading from buffer") n, err := d.buf.Read(p) if err != nil { switch err { @@ -445,6 +445,7 @@ func (d *ALSA) Read(p []byte) (int, error) { return 0, nil } } + d.l.Log(logger.Debug, fmt.Sprintf("%v read %v bytes", pkg, n)) chunk.Close() return n, nil }