mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
android: Adjust the buffer size to reduce noise on Android
This commit is contained in:
parent
fd71c86e20
commit
1da2e35b7a
@ -220,8 +220,9 @@ func (c *Context) Update() error {
|
||||
// is unexpectable.
|
||||
// e.g. a variable for JVM on Android might not be set.
|
||||
if c.driver == nil {
|
||||
// The buffer size is 1/20 sec.
|
||||
s := c.sampleRate * channelNum * bytesPerSample / 20
|
||||
// The buffer size is 1/15 sec.
|
||||
// It looks like 1/20 sec is too short for Android.
|
||||
s := c.sampleRate * channelNum * bytesPerSample / 15
|
||||
p, err := oto.NewPlayer(c.sampleRate, channelNum, bytesPerSample, s)
|
||||
c.driver = p
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user