From 3692a966bf1b1a3d6b303746365ecd20ce9ab7fe Mon Sep 17 00:00:00 2001 From: elasota Date: Tue, 30 Mar 2021 05:23:44 -0400 Subject: [PATCH] Tweak some values to help with sound choppiness in Chrome slightly, until we port to OpenAL --- AerofoilSDL/GpAudioDriver_SDL2.cpp | 2 +- AerofoilSDL/GpDisplayDriver_SDL_GL2.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AerofoilSDL/GpAudioDriver_SDL2.cpp b/AerofoilSDL/GpAudioDriver_SDL2.cpp index 9955a8b..4255fe1 100644 --- a/AerofoilSDL/GpAudioDriver_SDL2.cpp +++ b/AerofoilSDL/GpAudioDriver_SDL2.cpp @@ -437,7 +437,7 @@ bool GpAudioDriver_SDL2::Init() requestedSpec.channels = 1; requestedSpec.format = AUDIO_S16; requestedSpec.freq = m_properties.m_sampleRate; - requestedSpec.samples = 512; + requestedSpec.samples = 1024; requestedSpec.userdata = this; if (SDL_OpenAudio(&requestedSpec, nullptr)) diff --git a/AerofoilSDL/GpDisplayDriver_SDL_GL2.cpp b/AerofoilSDL/GpDisplayDriver_SDL_GL2.cpp index 33896de..e00e22f 100644 --- a/AerofoilSDL/GpDisplayDriver_SDL_GL2.cpp +++ b/AerofoilSDL/GpDisplayDriver_SDL_GL2.cpp @@ -3095,7 +3095,7 @@ bool GpDisplayDriver_SDL_GL2::SyncRender() SDL_GL_SwapWindow(m_window); #ifdef __EMSCRIPTEN__ - emscripten_sleep(16); + emscripten_sleep(1); #endif std::chrono::time_point::duration syncTime = std::chrono::high_resolution_clock::now().time_since_epoch();