mirror of https://bitbucket.org/ausocean/av.git
ADPCM: correct calls to adpcm functions in test
This commit is contained in:
parent
ebdd65ea09
commit
3f8d889ce5
|
@ -32,8 +32,6 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"bitbucket.org/ausocean/av/stream/adpcm"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestEncodeBlock will read PCM data, encode it in blocks and generate ADPCM
|
// TestEncodeBlock will read PCM data, encode it in blocks and generate ADPCM
|
||||||
|
@ -52,7 +50,7 @@ func TestEncodeBlock(t *testing.T) {
|
||||||
comp := make([]byte, 0, outBSize*numBlocks)
|
comp := make([]byte, 0, outBSize*numBlocks)
|
||||||
for i := 0; i < numBlocks; i++ {
|
for i := 0; i < numBlocks; i++ {
|
||||||
block := pcm[inBSize*i : inBSize*(i+1)]
|
block := pcm[inBSize*i : inBSize*(i+1)]
|
||||||
encBlock, err := adpcm.EncodeBlock(block)
|
encBlock, err := EncodeBlock(block)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -86,7 +84,7 @@ func TestDecodeBlock(t *testing.T) {
|
||||||
decoded := make([]byte, 0, outBSize*numBlocks)
|
decoded := make([]byte, 0, outBSize*numBlocks)
|
||||||
for i := 0; i < numBlocks; i++ {
|
for i := 0; i < numBlocks; i++ {
|
||||||
block := comp[inBSize*i : inBSize*(i+1)]
|
block := comp[inBSize*i : inBSize*(i+1)]
|
||||||
decBlock, err := adpcm.DecodeBlock(block)
|
decBlock, err := DecodeBlock(block)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue