From b18167b58d0348ddcfc5d932ff46205f6835bd33 Mon Sep 17 00:00:00 2001 From: Sergii Pylypenko Date: Wed, 5 May 2021 01:47:05 +0300 Subject: [PATCH] Emscripten: on the other hand, let's make audio buffer slightly bigger --- src/sound/sdl2_s.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/sdl2_s.cpp b/src/sound/sdl2_s.cpp index 98e9d75a34..b237cf80da 100644 --- a/src/sound/sdl2_s.cpp +++ b/src/sound/sdl2_s.cpp @@ -53,7 +53,7 @@ const char *SoundDriver_SDL::Start(const StringList &parm) // Yes, allocate 1/3 of a second for an audiobuffer. // Web browsers process sounds in the main thread together with video, // and FPS of the webapp is terrible. - spec.samples = GetDriverParamInt(parm, "samples", 4096); + spec.samples = GetDriverParamInt(parm, "samples", 8192); #endif spec.callback = fill_sound_buffer; SDL_AudioDeviceID dev = SDL_OpenAudioDevice(nullptr, 0, &spec, &spec_actual, SDL_AUDIO_ALLOW_FREQUENCY_CHANGE);