Checkpoint

This commit is contained in:
maze authored and maze committed 2026-10-29 17:29:41 +01:00
1 parent 85a9ec684c
commit c5d6137fab
160 files changed
+76293 -387

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
package audio
import "testing"
func TestFormatBitsPerSample(t *testing.T) {
testCases := []struct {
Test Format
Want int
}{
{Int8, 8},
{Int16, 16},
{Int16BE, 16},
{Int32, 32},
{Int32BE, 32},
}
for _, test := range testCases {
t.Run(test.Test.(pcmFormat).String(), func(it *testing.T) {
if v := test.Test.BitsPerSample(); v != test.Want {
it.Errorf("expected %d bits per sample, got %d", test.Want, v)
}
})
}
}