mirror of https://bitbucket.org/ausocean/av.git
alsa: return EOF from alsa.Read so that pauses can be detected and input stopped
This commit is contained in:
parent
23e4607cc5
commit
f9a6bcc9dc
|
@ -435,8 +435,8 @@ func (d *ALSA) Read(p []byte) (int, error) {
|
|||
if err != nil {
|
||||
switch err {
|
||||
case nil, io.EOF:
|
||||
d.l.Log(logger.Debug, pkg+"EOF")
|
||||
return n, nil
|
||||
d.l.Log(logger.Debug, pkg+"EOF from Read, stopping")
|
||||
return n, err
|
||||
default:
|
||||
d.l.Log(logger.Error, pkg+"unexpected error from Read", "error", err.Error())
|
||||
return n, nil
|
||||
|
|
Loading…
Reference in New Issue