From d28b2fa057efcbdd9d65d66c5cb57921c28c5ac1 Mon Sep 17 00:00:00 2001 From: RedDevilus Date: Wed, 11 Jan 2023 17:04:52 +0100 Subject: [PATCH] Qt: Lower audio ms + Tooltip (affinity+Cycle skip) Lowering 100 ms audio latency to 60 ms. Makes 100 mixing latency with 20 output latency (120) into a new default of 80 ms which is 50% lower but still is enough headroom as 40 ms even for less capable machines is too high. Adding tooltip for Affinity Control Changing tooltip for Cycle Skip from None to Disabled as that is a valid option. --- pcsx2-qt/Settings/AudioSettingsWidget.cpp | 6 ++-- pcsx2-qt/Settings/AudioSettingsWidget.ui | 28 +++++++++++++------ pcsx2-qt/Settings/EmulationSettingsWidget.cpp | 7 +++-- pcsx2/Config.h | 2 +- 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/pcsx2-qt/Settings/AudioSettingsWidget.cpp b/pcsx2-qt/Settings/AudioSettingsWidget.cpp index 5123f4075f..5636239c43 100644 --- a/pcsx2-qt/Settings/AudioSettingsWidget.cpp +++ b/pcsx2-qt/Settings/AudioSettingsWidget.cpp @@ -1,5 +1,5 @@ /* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2022 PCSX2 Dev Team + * Copyright (C) 2002-2023 PCSX2 Dev Team * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- @@ -33,7 +33,7 @@ static constexpr s32 DEFAULT_SYNCHRONIZATION_MODE = 0; static constexpr s32 DEFAULT_EXPANSION_MODE = 0; static constexpr s32 DEFAULT_DPL_DECODING_LEVEL = 0; static const char* DEFAULT_OUTPUT_MODULE = "cubeb"; -static constexpr s32 DEFAULT_TARGET_LATENCY = 100; +static constexpr s32 DEFAULT_TARGET_LATENCY = 60; static constexpr s32 DEFAULT_OUTPUT_LATENCY = 20; static constexpr s32 DEFAULT_VOLUME = 100; static constexpr s32 DEFAULT_SOUNDTOUCH_SEQUENCE_LENGTH = 30; @@ -117,7 +117,7 @@ AudioSettingsWidget::AudioSettingsWidget(SettingsDialog* dialog, QWidget* parent dialog->registerWidgetHelp(m_ui.backend, tr("Output Backend"), tr("Default"), tr("")); - dialog->registerWidgetHelp(m_ui.targetLatency, tr("Target Latency"), tr("100 ms"), + dialog->registerWidgetHelp(m_ui.targetLatency, tr("Target Latency"), tr("60 ms"), tr("Determines the buffer size which the time stretcher will try to keep filled. It effectively selects the average latency, as " "audio will be stretched/shrunk to keep the buffer size within check.")); dialog->registerWidgetHelp(m_ui.outputLatency, tr("Output Latency"), tr("20 ms"), diff --git a/pcsx2-qt/Settings/AudioSettingsWidget.ui b/pcsx2-qt/Settings/AudioSettingsWidget.ui index 178a083ee6..e215114a8d 100644 --- a/pcsx2-qt/Settings/AudioSettingsWidget.ui +++ b/pcsx2-qt/Settings/AudioSettingsWidget.ui @@ -7,7 +7,7 @@ 0 0 754 - 464 + 485 @@ -49,6 +49,9 @@ 100 + + 30 + Qt::Horizontal @@ -63,7 +66,7 @@ - 100 + 30 @@ -86,6 +89,9 @@ 30 + + 20 + Qt::Horizontal @@ -100,7 +106,7 @@ - 100 + 20 @@ -123,6 +129,9 @@ 15 + + 10 + Qt::Horizontal @@ -137,7 +146,7 @@ - 100 + 10 @@ -201,6 +210,9 @@ 200 + + 100 + Qt::Vertical @@ -366,7 +378,7 @@ 200 - 100 + 60 Qt::Horizontal @@ -382,7 +394,7 @@ - 100 ms + 60 ms @@ -425,7 +437,7 @@ 200 - 100 + 20 Qt::Horizontal @@ -441,7 +453,7 @@ - 100 ms + 20 ms diff --git a/pcsx2-qt/Settings/EmulationSettingsWidget.cpp b/pcsx2-qt/Settings/EmulationSettingsWidget.cpp index 2fe09ec108..4e00749b93 100644 --- a/pcsx2-qt/Settings/EmulationSettingsWidget.cpp +++ b/pcsx2-qt/Settings/EmulationSettingsWidget.cpp @@ -1,5 +1,5 @@ /* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2022 PCSX2 Dev Team + * Copyright (C) 2002-2023 PCSX2 Dev Team * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- @@ -100,9 +100,12 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsDialog* dialog, QWidget dialog->registerWidgetHelp(m_ui.eeCycleRate, tr("Cycle Rate"), tr("100% (Normal Speed)"), tr("Higher values may increase internal framerate in games, but will increase CPU requirements substantially. " "Lower values will reduce the CPU load allowing lightweight games to run full speed on weaker CPUs.")); - dialog->registerWidgetHelp(m_ui.eeCycleSkipping, tr("Cycle Skip"), tr("None"), + dialog->registerWidgetHelp(m_ui.eeCycleSkipping, tr("Cycle Skip"), tr("Disabled"), tr("Makes the emulated Emotion Engine skip cycles. " "Helps a small subset of games like SOTC. Most of the time it's harmful to performance.")); + dialog->registerWidgetHelp(m_ui.affinityControl, tr("Affinity Control"), tr("Disabled"), + tr("Sets the priority for specific threads in a specific order ignoring the system scheduler. " + "May help CPUs with big (P) and little (E) cores (e.g. Intel 12th or newer generation CPUs from Intel or other vendors such as AMD)")); dialog->registerWidgetHelp(m_ui.MTVU, tr("MTVU (Multi-threaded VU1)"), tr("Checked"), tr("Generally a speedup on CPUs with 3 or more threads. " "Safe for most games, but a few are incompatible and may hang.")); diff --git a/pcsx2/Config.h b/pcsx2/Config.h index f078dd1bb4..059f76aebe 100644 --- a/pcsx2/Config.h +++ b/pcsx2/Config.h @@ -821,7 +821,7 @@ struct Pcsx2Config SynchronizationMode SynchMode = SynchronizationMode::TimeStretch; s32 FinalVolume = 100; - s32 Latency = 100; + s32 Latency = 60; s32 OutputLatency = 20; s32 SpeakerConfiguration = 0; s32 DplDecodingLevel = 0;