alsa: log number of bytes read

This commit is contained in:
Trek H 2022-02-01 14:13:25 +10:30
parent be35600571
commit a0867331cb
1 changed files with 2 additions and 1 deletions

View File

@ -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
}