diff --git a/main_test.go b/main_test.go index 8deb250..63140ea 100644 --- a/main_test.go +++ b/main_test.go @@ -214,7 +214,46 @@ func TestSampleRate(t *testing.T) { []byte{0xff, 0xfa, 0x9c, 0}, 0, }, - // TODO finish + { + "MPEG2 22.05k", + []byte{0xff, 0xf6, 0x90, 0}, + 22050, + }, + { + "MPEG2 24k", + []byte{0xff, 0xf6, 0x94, 0}, + 24000, + }, + { + "MPEG2 16k", + []byte{0xff, 0xf6, 0x98, 0}, + 16000, + }, + { + "MPEG2 Reserved", + []byte{0xff, 0xf6, 0x9c, 0}, + 0, + }, + { + "MPEG25 11.025k", + []byte{0xff, 0xe6, 0x90, 0}, + 11025, + }, + { + "MPEG25 12k", + []byte{0xff, 0xe6, 0x94, 0}, + 12000, + }, + { + "MPEG25 8k", + []byte{0xff, 0xe6, 0x98, 0}, + 8000, + }, + { + "MPEG25 Reserved", + []byte{0xff, 0xe6, 0x9c, 0}, + 0, + }, } for _, tc := range testCases {