add MP4A-LATM decoder and encoder (#299)

This commit is contained in:
Alessandro Ros
2023-06-01 20:07:47 +02:00
committed by GitHub
parent 84048960b4
commit 80cf861ec7
87 changed files with 1795 additions and 699 deletions

View File

@@ -27,12 +27,16 @@ func TestLPCMDecEncoder(t *testing.T) {
ChannelCount: 2,
}
enc := format.CreateEncoder()
enc, err := format.CreateEncoder2()
require.NoError(t, err)
pkts, err := enc.Encode([]byte{0x01, 0x02, 0x03, 0x04}, 0)
require.NoError(t, err)
require.Equal(t, format.PayloadType(), pkts[0].PayloadType)
dec := format.CreateDecoder()
dec, err := format.CreateDecoder2()
require.NoError(t, err)
byts, _, err := dec.Decode(pkts[0])
require.NoError(t, err)
require.Equal(t, []byte{0x01, 0x02, 0x03, 0x04}, byts)