From 88190202cc7d1abad30a2f1adebace5ebb1faee3 Mon Sep 17 00:00:00 2001 From: Zaggy1024 Date: Mon, 7 Aug 2023 03:27:59 -0500 Subject: [PATCH] LibWeb: Update the audio timestamp every 50 ms instead of every 10 ms The previous update time of 10 ms was set completely arbitrarily, but puts an unnecessary load on the CPU. This reduces the rate, and it can be adjusted in future depending on what web pages expect. --- Userland/Libraries/LibWeb/Platform/AudioCodecPluginAgnostic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Platform/AudioCodecPluginAgnostic.cpp b/Userland/Libraries/LibWeb/Platform/AudioCodecPluginAgnostic.cpp index 9acd9cb40d..c396c25ac2 100644 --- a/Userland/Libraries/LibWeb/Platform/AudioCodecPluginAgnostic.cpp +++ b/Userland/Libraries/LibWeb/Platform/AudioCodecPluginAgnostic.cpp @@ -15,7 +15,7 @@ namespace Web::Platform { -constexpr int update_interval = 10; +constexpr int update_interval = 50; static Duration timestamp_from_samples(i64 samples, u32 sample_rate) {