Browse Source

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__
pull/1306/head
Random 4 years ago
committed by GitHub
parent
commit
86a8f1d5d5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/raudio.c

+ 3
- 0
src/raudio.c View File

@ -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)

Loading…
Cancel
Save