Skip to content

Commit 002c819

Browse files
committed
internal/mux: add tests
Updates #258
1 parent 41bc1c9 commit 002c819

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

oto_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,16 @@ func TestEmptyPlayer(t *testing.T) {
4747
time.Sleep(time.Millisecond)
4848
}
4949
}
50+
51+
// Issue #258
52+
func TestSetBufferSize(t *testing.T) {
53+
for i := 0; i < 10; i++ {
54+
bs := bytes.NewReader(make([]byte, 512))
55+
p := theContext.NewPlayer(bs)
56+
p.Play()
57+
p.SetBufferSize(256)
58+
for p.IsPlaying() {
59+
time.Sleep(time.Millisecond)
60+
}
61+
}
62+
}

0 commit comments

Comments
 (0)