From 5d2a9fa1cf052016aaf1498f7c2b1d65f43d97cb Mon Sep 17 00:00:00 2001 From: bicarus <202771338+bicarus-dev@users.noreply.github.com> Date: Thu, 8 Jan 2026 13:56:10 -0800 Subject: [PATCH] audio: update logging for low latency option (#505) ## Description of change Spit out an error if the minimum latency is not any lower than the default. --- .../hooks/audio/backends/wasapi/low_latency_client.cpp | 7 +++++++ src/spice2x/launcher/options.cpp | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/spice2x/hooks/audio/backends/wasapi/low_latency_client.cpp b/src/spice2x/hooks/audio/backends/wasapi/low_latency_client.cpp index 94dd96a..598b879 100644 --- a/src/spice2x/hooks/audio/backends/wasapi/low_latency_client.cpp +++ b/src/spice2x/hooks/audio/backends/wasapi/low_latency_client.cpp @@ -149,5 +149,12 @@ LowLatencyAudioClient *LowLatencyAudioClient::Create(IMMDevice *device) { log_info("audio::lowlatency", "... max buffer size : {} samples ({} ms)", maxPeriod, 1000.0f * maxPeriod / pFormat->nSamplesPerSec); log_info("audio::lowlatency", "... default buffer size : {} samples ({} ms)", defaultPeriod, 1000.0f * defaultPeriod / pFormat->nSamplesPerSec); log_info("audio::lowlatency", "... Windows will use minimum buffer size (instead of default) for shared mode audio clients from now on"); + if (minPeriod < defaultPeriod) { + log_info("audio::lowlatency", "minimum period is less than default period, you will see latency improvement"); + } else { + log_warning("audio::lowlatency", "minimum period is not less than default period, you will see NO latency improvement"); + log_warning("audio::lowlatency", "this an audio driver / hardware limitation"); + } + return new LowLatencyAudioClient(audioClient); } diff --git a/src/spice2x/launcher/options.cpp b/src/spice2x/launcher/options.cpp index c530833..cca8a63 100644 --- a/src/spice2x/launcher/options.cpp +++ b/src/spice2x/launcher/options.cpp @@ -258,7 +258,7 @@ static const std::vector OPTION_DEFINITIONS = { // Graphics9On12 .title = "DirectX 9 on 12 (DEPRECATED - use -dx9on12 instead)", .name = "9on12", - .desc = "Use D3D9On12 wrapper library, requires Windows 10 Insider Preview 18956 or later. Deprecated - use -dx9on12 instead", + .desc = "Use D3D9On12 wrapper library, requires Windows 10. Deprecated - use -dx9on12 instead", .type = OptionType::Bool, .hidden = true, .category = "Graphics (Common)", @@ -269,7 +269,7 @@ static const std::vector OPTION_DEFINITIONS = { .name = "sp2x-dx9on12", .display_name = "dx9on12", .aliases= "dx9on12", - .desc = "Use D3D9On12 wrapper library, requires Windows 10 Insider Preview 18956 or later. Has no effect games on that don't use DX9. Can cause some games to crash.\n\n" + .desc = "Use D3D9On12 wrapper library, requires Windows 10. Has no effect games on that don't use DX9. Can cause some games to crash.\n\n" "Default: auto (use DX9 for most games, but turn on 9on12 for games that require it on non-NVIDIA GPUs)", .type = OptionType::Enum, .category = "Graphics (Common)", @@ -2227,7 +2227,7 @@ static const std::vector OPTION_DEFINITIONS = { .display_name = "tapeledalgo", .aliases= "tapeledalgo", .desc = "For games with light arrays, determine the algorithm that is used to translate them into a single light binding in Lights tab. " - "Only applies to IIDX, SDVX, and DDR for now. Default: mid", + "Default: mid", .type = OptionType::Enum, .category = "I/O Options", .elements = {