mirror of https://bitbucket.org/ausocean/av.git
device/alsa: check error
This commit is contained in:
parent
baef3c0585
commit
5f4bcb61e0
|
@ -70,6 +70,9 @@ func TestDevice(t *testing.T) {
|
|||
}
|
||||
cs := ai.DataSize()
|
||||
lexer, err := codecutil.NewByteLexer(cs)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error creating byte lexer: %v", err)
|
||||
}
|
||||
go lexer.Lex(ioutil.Discard, ai, time.Duration(c.RecPeriod*float64(time.Second)))
|
||||
time.Sleep(time.Duration(c.RecPeriod*float64(time.Second)) * time.Duration(n))
|
||||
ai.Stop()
|
||||
|
|
Loading…
Reference in New Issue