diff options
| author | Random <[email protected]> | 2020-07-10 03:34:35 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-07-10 12:34:35 +0200 |
| commit | 86a8f1d5d57aea88f95618661c52207547700258 (patch) | |
| tree | bc1cb0f0309b96322a19d08bc81cce25f7f6bda2 /src | |
| parent | b4ff6fdde3012263082de8cbf40861d14aedf325 (diff) | |
| download | raylib-86a8f1d5d57aea88f95618661c52207547700258.tar.gz raylib-86a8f1d5d57aea88f95618661c52207547700258.zip | |
Chromium needs a larger audio buffer (#1300)
* Chromium needs a larger audio buffer: https://github.com/dr-soft/miniaudio/issues/150
* changed PLATFORM_WEB to __EMSCRIPTEN__
Diffstat (limited to 'src')
| -rw-r--r-- | src/raudio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/raudio.c b/src/raudio.c index 66afc924..81ccc854 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(__EMSCRIPTEN__) + config.periodSizeInMilliseconds = 33; +#endif result = ma_device_init(&AUDIO.System.context, &config, &AUDIO.System.device); if (result != MA_SUCCESS) |
