mirror of https://bitbucket.org/ausocean/av.git
35 lines
748 B
Go
35 lines
748 B
Go
package revid
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"bitbucket.org/ausocean/av/container/mts"
|
|
"bitbucket.org/ausocean/av/container/mts/meta"
|
|
"bitbucket.org/ausocean/iot/pi/netsender"
|
|
)
|
|
|
|
func TestAudioPipeline(t *testing.T) {
|
|
mts.Meta = meta.New()
|
|
var logger testLogger
|
|
ns, err := netsender.New(&logger, nil, nil, nil)
|
|
if err != nil {
|
|
t.Errorf("netsender.New failed with error %v", err)
|
|
}
|
|
|
|
var c Config
|
|
c.Logger = &logger
|
|
c.Input = File
|
|
c.InputPath = "../../test/test-data/av/input/original_8kHz_adpcm_test.pcm"
|
|
c.Outputs = []uint8{File}
|
|
c.OutputPath = "./test-temp"
|
|
|
|
rv, err := New(c, ns)
|
|
if err != nil {
|
|
t.Errorf("revid.New failed with error %v", err)
|
|
} else if rv == nil {
|
|
t.Errorf("revid.New did not return a new revid")
|
|
}
|
|
|
|
rv.Stop()
|
|
}
|