mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
audio: Bug fix: Super noisy with 32000 Hz on browsers
This commit is contained in:
parent
d455b9b8bb
commit
d9f6699b7f
@ -23,15 +23,14 @@ import (
|
|||||||
func (c *Context) bufferSize() int {
|
func (c *Context) bufferSize() int {
|
||||||
n := 10
|
n := 10
|
||||||
if !web.IsMobileBrowser() {
|
if !web.IsMobileBrowser() {
|
||||||
// TODO: On Chrome and Firefox, 1/30[s] doesn't work with 24000 or 48000 [Hz]
|
// TODO: More general calculation
|
||||||
// at least on macOS.
|
|
||||||
switch c.sampleRate {
|
switch c.sampleRate {
|
||||||
case 44100, 88200:
|
case 44100, 88200:
|
||||||
n = 30
|
n = 30
|
||||||
case 22050:
|
case 22050:
|
||||||
// #434
|
// #434
|
||||||
n = 15
|
n = 15
|
||||||
case 24000, 48000:
|
case 24000, 32000, 48000:
|
||||||
n = 20
|
n = 20
|
||||||
default:
|
default:
|
||||||
n = 15
|
n = 15
|
||||||
|
Loading…
Reference in New Issue
Block a user