mirror of https://bitbucket.org/ausocean/av.git
device/alsa: check error
This commit is contained in:
parent
95991f4c75
commit
2d37aa73dc
|
@ -70,6 +70,9 @@ func TestDevice(t *testing.T) {
|
||||||
}
|
}
|
||||||
cs := ai.DataSize()
|
cs := ai.DataSize()
|
||||||
lexer, err := codecutil.NewByteLexer(cs)
|
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)))
|
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))
|
time.Sleep(time.Duration(c.RecPeriod*float64(time.Second)) * time.Duration(n))
|
||||||
ai.Stop()
|
ai.Stop()
|
||||||
|
|
Loading…
Reference in New Issue