From 2d1ae8fd1e15c41b9e3f2e6f3bdb95b3febd6aee Mon Sep 17 00:00:00 2001 From: RandomErrorMessage <35673979+RandomErrorMessage@users.noreply.github.com> Date: Wed, 8 Jul 2020 12:38:29 -0700 Subject: [PATCH] Chromium needs a larger audio buffer: https://github.com/dr-soft/miniaudio/issues/150 --- src/raudio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/raudio.c b/src/raudio.c index 66afc9246..e0e96f264 100644 --- a/src/raudio.c +++ b/src/raudio.c @@ -419,6 +419,9 @@ void InitAudioDevice(void) config.sampleRate = AUDIO_DEVICE_SAMPLE_RATE; config.dataCallback = OnSendAudioDataToDevice; config.pUserData = NULL; +#if defined(PLATFORM_WEB) + config.periodSizeInMilliseconds = 33; +#endif result = ma_device_init(&AUDIO.System.context, &config, &AUDIO.System.device); if (result != MA_SUCCESS)