2017-06-21 10:27:21 +02:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
2021-07-05 03:22:19 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2017-06-21 10:27:21 +02:00
|
|
|
|
2018-07-07 00:40:15 +02:00
|
|
|
#include "DolphinQt/Settings/AudioPane.h"
|
2017-06-21 10:27:21 +02:00
|
|
|
|
2025-04-06 04:57:01 +02:00
|
|
|
#include <string>
|
|
|
|
#include <utility>
|
|
|
|
#include <vector>
|
|
|
|
|
2019-03-21 14:25:57 +01:00
|
|
|
#include <QFontMetrics>
|
2017-06-21 10:27:21 +02:00
|
|
|
#include <QFormLayout>
|
|
|
|
#include <QGridLayout>
|
|
|
|
#include <QGroupBox>
|
2021-05-20 11:25:05 -07:00
|
|
|
#include <QHBoxLayout>
|
2017-06-21 10:27:21 +02:00
|
|
|
#include <QLabel>
|
|
|
|
#include <QRadioButton>
|
|
|
|
#include <QSpacerItem>
|
2025-04-06 04:57:01 +02:00
|
|
|
#include <QString>
|
2017-06-21 10:27:21 +02:00
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
|
|
|
#include "AudioCommon/AudioCommon.h"
|
2019-03-18 08:22:27 -03:00
|
|
|
#include "AudioCommon/Enums.h"
|
2018-02-10 21:03:27 +01:00
|
|
|
#include "AudioCommon/WASAPIStream.h"
|
2018-05-28 03:48:04 +02:00
|
|
|
|
2018-07-19 18:10:37 -04:00
|
|
|
#include "Core/Config/MainSettings.h"
|
2017-09-04 11:12:13 -07:00
|
|
|
#include "Core/Core.h"
|
2022-10-13 21:01:55 +02:00
|
|
|
#include "Core/System.h"
|
2025-03-02 20:19:20 -05:00
|
|
|
#include "DolphinQt/Config/ConfigControls/ConfigBool.h"
|
2024-10-10 17:00:41 -07:00
|
|
|
#include "DolphinQt/Config/ConfigControls/ConfigChoice.h"
|
|
|
|
#include "DolphinQt/Config/ConfigControls/ConfigRadio.h"
|
|
|
|
#include "DolphinQt/Config/ConfigControls/ConfigSlider.h"
|
|
|
|
|
2018-07-07 00:40:15 +02:00
|
|
|
#include "DolphinQt/Config/SettingsWindow.h"
|
|
|
|
#include "DolphinQt/Settings.h"
|
2017-06-21 10:27:21 +02:00
|
|
|
|
|
|
|
AudioPane::AudioPane()
|
|
|
|
{
|
2017-11-07 07:55:44 -02:00
|
|
|
CheckNeedForLatencyControl();
|
2017-06-21 10:27:21 +02:00
|
|
|
CreateWidgets();
|
2024-10-10 17:00:41 -07:00
|
|
|
AddDescriptions();
|
2017-06-21 10:27:21 +02:00
|
|
|
ConnectWidgets();
|
2024-10-10 17:00:41 -07:00
|
|
|
OnBackendChanged();
|
2017-06-21 10:27:21 +02:00
|
|
|
|
2022-08-08 11:25:19 +10:00
|
|
|
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this](Core::State state) {
|
|
|
|
OnEmulationStateChanged(state != Core::State::Uninitialized);
|
|
|
|
});
|
2019-10-26 17:50:54 +02:00
|
|
|
|
2024-07-02 17:27:04 +02:00
|
|
|
OnEmulationStateChanged(!Core::IsUninitialized(Core::System::GetInstance()));
|
2017-06-21 10:27:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void AudioPane::CreateWidgets()
|
|
|
|
{
|
2024-10-10 17:00:41 -07:00
|
|
|
auto* dsp_box = new QGroupBox(tr("DSP Options"));
|
|
|
|
auto* dsp_layout = new QHBoxLayout;
|
2017-06-21 10:27:21 +02:00
|
|
|
|
|
|
|
dsp_box->setLayout(dsp_layout);
|
2024-10-10 17:00:41 -07:00
|
|
|
QLabel* dsp_combo_label = new QLabel(tr("DSP Emulation Engine:"));
|
|
|
|
m_dsp_combo = new ConfigComplexChoice(Config::MAIN_DSP_HLE, Config::MAIN_DSP_JIT);
|
|
|
|
m_dsp_combo->Add(tr("HLE (recommended)"), true, true);
|
|
|
|
m_dsp_combo->Add(tr("LLE Recompiler (slow)"), false, true);
|
|
|
|
m_dsp_combo->Add(tr("LLE Interpreter (very slow)"), false, false);
|
2025-03-26 13:15:57 -07:00
|
|
|
// The state true/false shouldn't normally happen, but is HLE (index 0) when it does.
|
|
|
|
m_dsp_combo->SetDefault(0);
|
2024-10-10 17:00:41 -07:00
|
|
|
m_dsp_combo->Refresh();
|
|
|
|
|
|
|
|
dsp_layout->addWidget(dsp_combo_label);
|
|
|
|
dsp_layout->addWidget(m_dsp_combo, Qt::AlignLeft);
|
2017-06-21 10:27:21 +02:00
|
|
|
|
|
|
|
auto* volume_box = new QGroupBox(tr("Volume"));
|
|
|
|
auto* volume_layout = new QVBoxLayout;
|
2024-10-10 17:00:41 -07:00
|
|
|
m_volume_slider = new ConfigSlider(0, 100, Config::MAIN_AUDIO_VOLUME);
|
|
|
|
m_volume_indicator = new QLabel(tr("%1 %").arg(m_volume_slider->value()));
|
2017-06-21 10:27:21 +02:00
|
|
|
|
|
|
|
volume_box->setLayout(volume_layout);
|
|
|
|
|
2024-10-10 17:00:41 -07:00
|
|
|
m_volume_slider->setOrientation(Qt::Vertical);
|
2017-06-21 10:27:21 +02:00
|
|
|
|
|
|
|
m_volume_indicator->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter);
|
2019-03-21 14:25:57 +01:00
|
|
|
m_volume_indicator->setFixedWidth(QFontMetrics(font()).boundingRect(tr("%1 %").arg(100)).width());
|
2017-06-21 10:27:21 +02:00
|
|
|
|
|
|
|
volume_layout->addWidget(m_volume_slider, 0, Qt::AlignHCenter);
|
|
|
|
volume_layout->addWidget(m_volume_indicator, 0, Qt::AlignHCenter);
|
|
|
|
|
|
|
|
auto* backend_box = new QGroupBox(tr("Backend Settings"));
|
|
|
|
auto* backend_layout = new QFormLayout;
|
|
|
|
backend_box->setLayout(backend_layout);
|
|
|
|
m_backend_label = new QLabel(tr("Audio Backend:"));
|
2025-04-06 04:57:01 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
std::vector<std::string> backends = AudioCommon::GetSoundBackends();
|
|
|
|
std::vector<std::pair<QString, QString>> translated_backends;
|
|
|
|
translated_backends.reserve(backends.size());
|
|
|
|
for (const std::string& backend : backends)
|
|
|
|
{
|
|
|
|
translated_backends.push_back(
|
|
|
|
std::make_pair(tr(backend.c_str()), QString::fromStdString(backend)));
|
|
|
|
}
|
|
|
|
m_backend_combo = new ConfigStringChoice(translated_backends, Config::MAIN_AUDIO_BACKEND);
|
|
|
|
}
|
|
|
|
|
2024-10-10 17:00:41 -07:00
|
|
|
m_dolby_pro_logic = new ConfigBool(tr("Dolby Pro Logic II Decoder"), Config::MAIN_DPL2_DECODER);
|
2019-03-18 08:22:27 -03:00
|
|
|
m_dolby_quality_label = new QLabel(tr("Decoding Quality:"));
|
|
|
|
|
2024-10-10 17:00:41 -07:00
|
|
|
QStringList quality_options{tr("Lowest (Latency ~10 ms)"), tr("Low (Latency ~20 ms)"),
|
|
|
|
tr("High (Latency ~40 ms)"), tr("Highest (Latency ~80 ms)")};
|
|
|
|
|
|
|
|
m_dolby_quality_combo = new ConfigChoice(quality_options, Config::MAIN_DPL2_QUALITY);
|
2019-03-18 08:22:27 -03:00
|
|
|
|
2018-06-12 15:45:33 +02:00
|
|
|
backend_layout->setFormAlignment(Qt::AlignLeft | Qt::AlignTop);
|
|
|
|
backend_layout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
|
2017-06-21 10:27:21 +02:00
|
|
|
backend_layout->addRow(m_backend_label, m_backend_combo);
|
2018-02-10 21:03:27 +01:00
|
|
|
|
|
|
|
#ifdef _WIN32
|
2024-10-10 17:00:41 -07:00
|
|
|
std::vector<std::pair<QString, QString>> wasapi_options;
|
|
|
|
wasapi_options.push_back(
|
|
|
|
std::pair<QString, QString>{tr("Default Device"), QStringLiteral("default")});
|
|
|
|
|
|
|
|
for (auto string : WASAPIStream::GetAvailableDevices())
|
|
|
|
{
|
|
|
|
wasapi_options.push_back(std::pair<QString, QString>{QString::fromStdString(string),
|
|
|
|
QString::fromStdString(string)});
|
|
|
|
}
|
|
|
|
|
|
|
|
m_wasapi_device_label = new QLabel(tr("Output Device:"));
|
|
|
|
m_wasapi_device_combo = new ConfigStringChoice(wasapi_options, Config::MAIN_WASAPI_DEVICE);
|
2018-02-10 21:03:27 +01:00
|
|
|
|
|
|
|
backend_layout->addRow(m_wasapi_device_label, m_wasapi_device_combo);
|
|
|
|
#endif
|
|
|
|
|
2024-10-10 17:00:41 -07:00
|
|
|
if (m_latency_control_supported)
|
|
|
|
{
|
|
|
|
m_latency_slider = new ConfigSlider(0, 200, Config::MAIN_AUDIO_LATENCY);
|
|
|
|
m_latency_label = new QLabel(tr("Latency: %1 ms").arg(m_latency_slider->value()));
|
|
|
|
m_latency_label->setFixedWidth(
|
|
|
|
QFontMetrics(font()).boundingRect(tr("Latency: 000 ms")).width());
|
|
|
|
|
|
|
|
backend_layout->addRow(m_latency_label, m_latency_slider);
|
|
|
|
}
|
|
|
|
|
2017-06-21 10:27:21 +02:00
|
|
|
backend_layout->addRow(m_dolby_pro_logic);
|
2024-10-10 17:00:41 -07:00
|
|
|
backend_layout->addRow(m_dolby_quality_label, m_dolby_quality_combo);
|
2017-06-21 10:27:21 +02:00
|
|
|
|
2018-05-12 23:29:54 +02:00
|
|
|
dsp_box->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
|
|
|
|
2025-04-01 18:17:21 -04:00
|
|
|
auto* playback_box = new QGroupBox(tr("Audio Playback Settings"));
|
|
|
|
auto* playback_layout = new QGridLayout;
|
|
|
|
playback_box->setLayout(playback_layout);
|
|
|
|
|
|
|
|
ConfigSlider* audio_buffer_size = new ConfigSlider(16, 512, Config::MAIN_AUDIO_BUFFER_SIZE, 8);
|
|
|
|
QLabel* audio_buffer_size_label = new QLabel;
|
|
|
|
|
|
|
|
audio_buffer_size->setSingleStep(8);
|
|
|
|
audio_buffer_size->setPageStep(8);
|
|
|
|
|
|
|
|
audio_buffer_size->SetDescription(
|
|
|
|
tr("Controls the number of audio samples buffered."
|
|
|
|
" Lower values reduce latency but may cause more crackling or stuttering."
|
|
|
|
"<br><br><dolphin_emphasis>If unsure, set this to 80 ms.</dolphin_emphasis>"));
|
|
|
|
|
|
|
|
// Connect the slider to update the value label live
|
|
|
|
connect(audio_buffer_size, &QSlider::valueChanged, this, [=](int value) {
|
|
|
|
int stepped_value = (value / 8) * 8;
|
|
|
|
audio_buffer_size->setValue(stepped_value);
|
|
|
|
audio_buffer_size_label->setText(tr("%1 ms").arg(stepped_value));
|
|
|
|
});
|
|
|
|
|
|
|
|
// Set initial value display
|
|
|
|
audio_buffer_size_label->setText(tr("%1 ms").arg(audio_buffer_size->value()));
|
2024-10-09 17:39:18 -07:00
|
|
|
|
2025-03-02 20:19:20 -05:00
|
|
|
m_audio_fill_gaps = new ConfigBool(tr("Fill Audio Gaps"), Config::MAIN_AUDIO_FILL_GAPS);
|
|
|
|
|
|
|
|
m_speed_up_mute_enable = new ConfigBool(tr("Mute When Disabling Speed Limit"),
|
|
|
|
Config::MAIN_AUDIO_MUTE_ON_DISABLED_SPEED_LIMIT);
|
2024-10-09 17:39:18 -07:00
|
|
|
|
2025-04-01 18:17:21 -04:00
|
|
|
// Create a horizontal layout for the slider + value label
|
|
|
|
auto* buffer_layout = new QHBoxLayout;
|
|
|
|
buffer_layout->addWidget(new ConfigSliderLabel(tr("Audio Buffer Size:"), audio_buffer_size));
|
|
|
|
buffer_layout->addWidget(audio_buffer_size);
|
|
|
|
buffer_layout->addWidget(audio_buffer_size_label);
|
|
|
|
|
|
|
|
playback_layout->addLayout(buffer_layout, 0, 0);
|
|
|
|
playback_layout->addWidget(m_audio_fill_gaps, 1, 0);
|
|
|
|
playback_layout->addWidget(m_speed_up_mute_enable, 2, 0);
|
|
|
|
playback_layout->setRowStretch(3, 1);
|
|
|
|
playback_box->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
2024-10-09 17:39:18 -07:00
|
|
|
|
2021-05-20 11:25:05 -07:00
|
|
|
auto* const main_vbox_layout = new QVBoxLayout;
|
2024-10-09 17:39:18 -07:00
|
|
|
|
2021-05-20 11:25:05 -07:00
|
|
|
main_vbox_layout->addWidget(dsp_box);
|
|
|
|
main_vbox_layout->addWidget(backend_box);
|
2025-04-01 18:17:21 -04:00
|
|
|
main_vbox_layout->addWidget(playback_box);
|
2021-05-20 11:25:05 -07:00
|
|
|
|
|
|
|
m_main_layout = new QHBoxLayout;
|
|
|
|
m_main_layout->addLayout(main_vbox_layout);
|
|
|
|
m_main_layout->addWidget(volume_box);
|
2017-06-21 10:27:21 +02:00
|
|
|
|
|
|
|
setLayout(m_main_layout);
|
2021-05-20 11:25:05 -07:00
|
|
|
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
2017-06-21 10:27:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void AudioPane::ConnectWidgets()
|
|
|
|
{
|
2024-10-10 17:00:41 -07:00
|
|
|
connect(m_backend_combo, &QComboBox::currentIndexChanged, this, &AudioPane::OnBackendChanged);
|
|
|
|
connect(m_dolby_pro_logic, &ConfigBool::toggled, this, &AudioPane::OnDspChanged);
|
|
|
|
connect(m_dsp_combo, &ConfigComplexChoice::currentIndexChanged, this, &AudioPane::OnDspChanged);
|
|
|
|
connect(m_volume_slider, &QSlider::valueChanged, this, [this](int value) {
|
|
|
|
m_volume_indicator->setText(tr("%1%").arg(value));
|
|
|
|
AudioCommon::UpdateSoundStream(Core::System::GetInstance());
|
|
|
|
});
|
2025-03-28 14:22:40 -07:00
|
|
|
|
|
|
|
if (m_latency_control_supported)
|
|
|
|
{
|
|
|
|
connect(m_latency_slider, &QSlider::valueChanged, this,
|
|
|
|
[this](int value) { m_latency_label->setText(tr("Latency: %1 ms").arg(value)); });
|
|
|
|
}
|
2017-06-21 10:27:21 +02:00
|
|
|
}
|
|
|
|
|
2019-06-15 08:36:47 -03:00
|
|
|
void AudioPane::OnDspChanged()
|
|
|
|
{
|
2021-10-13 20:29:04 -04:00
|
|
|
const auto backend = Config::Get(Config::MAIN_AUDIO_BACKEND);
|
2024-10-10 17:00:41 -07:00
|
|
|
const bool enabled =
|
|
|
|
AudioCommon::SupportsDPL2Decoder(backend) && !Config::Get(Config::MAIN_DSP_HLE);
|
|
|
|
m_dolby_pro_logic->setEnabled(enabled);
|
|
|
|
m_dolby_quality_label->setEnabled(enabled && m_dolby_pro_logic->isChecked());
|
|
|
|
m_dolby_quality_combo->setEnabled(enabled && m_dolby_pro_logic->isChecked());
|
2019-06-15 08:36:47 -03:00
|
|
|
}
|
|
|
|
|
2017-06-21 10:27:21 +02:00
|
|
|
void AudioPane::OnBackendChanged()
|
|
|
|
{
|
2024-10-10 17:00:41 -07:00
|
|
|
OnDspChanged();
|
|
|
|
|
2021-10-13 20:29:04 -04:00
|
|
|
const auto backend = Config::Get(Config::MAIN_AUDIO_BACKEND);
|
2017-06-21 10:27:21 +02:00
|
|
|
|
2017-11-07 07:55:44 -02:00
|
|
|
if (m_latency_control_supported)
|
|
|
|
{
|
|
|
|
m_latency_label->setEnabled(AudioCommon::SupportsLatencyControl(backend));
|
2024-10-10 17:00:41 -07:00
|
|
|
m_latency_slider->setEnabled(AudioCommon::SupportsLatencyControl(backend));
|
2017-11-07 07:55:44 -02:00
|
|
|
}
|
2018-02-10 21:03:27 +01:00
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
bool is_wasapi = backend == BACKEND_WASAPI;
|
|
|
|
m_wasapi_device_label->setHidden(!is_wasapi);
|
|
|
|
m_wasapi_device_combo->setHidden(!is_wasapi);
|
|
|
|
#endif
|
|
|
|
|
2017-06-21 10:27:21 +02:00
|
|
|
m_volume_slider->setEnabled(AudioCommon::SupportsVolumeChanges(backend));
|
|
|
|
m_volume_indicator->setEnabled(AudioCommon::SupportsVolumeChanges(backend));
|
|
|
|
}
|
|
|
|
|
|
|
|
void AudioPane::OnEmulationStateChanged(bool running)
|
|
|
|
{
|
2024-10-10 17:00:41 -07:00
|
|
|
m_dsp_combo->setEnabled(!running);
|
2017-06-21 10:27:21 +02:00
|
|
|
m_backend_label->setEnabled(!running);
|
|
|
|
m_backend_combo->setEnabled(!running);
|
2021-10-13 20:29:04 -04:00
|
|
|
if (AudioCommon::SupportsDPL2Decoder(Config::Get(Config::MAIN_AUDIO_BACKEND)) &&
|
2024-10-10 17:00:41 -07:00
|
|
|
!Config::Get(Config::MAIN_DSP_HLE))
|
2019-03-18 08:22:27 -03:00
|
|
|
{
|
|
|
|
m_dolby_pro_logic->setEnabled(!running);
|
2024-10-10 17:00:41 -07:00
|
|
|
m_dolby_quality_label->setEnabled(!running && m_dolby_pro_logic->isChecked());
|
|
|
|
m_dolby_quality_combo->setEnabled(!running && m_dolby_pro_logic->isChecked());
|
2019-03-18 08:22:27 -03:00
|
|
|
}
|
2020-12-28 17:05:45 -08:00
|
|
|
if (m_latency_control_supported &&
|
2021-10-13 20:29:04 -04:00
|
|
|
AudioCommon::SupportsLatencyControl(Config::Get(Config::MAIN_AUDIO_BACKEND)))
|
2017-11-07 07:55:44 -02:00
|
|
|
{
|
|
|
|
m_latency_label->setEnabled(!running);
|
2024-10-10 17:00:41 -07:00
|
|
|
m_latency_slider->setEnabled(!running);
|
2017-11-07 07:55:44 -02:00
|
|
|
}
|
2018-02-10 21:03:27 +01:00
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
m_wasapi_device_combo->setEnabled(!running);
|
|
|
|
#endif
|
2017-06-21 10:27:21 +02:00
|
|
|
}
|
|
|
|
|
2017-11-07 07:55:44 -02:00
|
|
|
void AudioPane::CheckNeedForLatencyControl()
|
|
|
|
{
|
|
|
|
std::vector<std::string> backends = AudioCommon::GetSoundBackends();
|
2024-09-30 17:26:50 -07:00
|
|
|
m_latency_control_supported = std::ranges::any_of(backends, AudioCommon::SupportsLatencyControl);
|
2017-11-07 07:55:44 -02:00
|
|
|
}
|
2019-03-18 08:22:27 -03:00
|
|
|
|
2024-10-10 17:00:41 -07:00
|
|
|
void AudioPane::AddDescriptions()
|
2019-03-18 08:22:27 -03:00
|
|
|
{
|
2024-10-10 17:00:41 -07:00
|
|
|
static const char TR_DSP_DESCRIPTION[] = QT_TR_NOOP(
|
|
|
|
"Selects how the Digital Signal Processor (DSP) is emulated. Determines how the audio is "
|
|
|
|
"processed and what system features are available.<br><br>"
|
|
|
|
"<b>HLE</b> - High Level Emulation of the DSP. Fast, but not always accurate. Lacks Dolby "
|
|
|
|
"Pro Logic II decoding.<br><br>"
|
|
|
|
"<b>LLE Recompiler</b> - Low Level Emulation of the DSP, via a recompiler. Slower, but more "
|
|
|
|
"accurate. Enables Dolby Pro Logic II decoding on certain audio backends.<br><br>"
|
|
|
|
"<b>LLE Interpreter</b> - Low Level Emulation of the DSP, via an interpreter. Slowest, for "
|
|
|
|
"debugging purposes only. Not recommended.<br><br><dolphin_emphasis>If unsure, select "
|
|
|
|
"HLE.</dolphin_emphasis>");
|
|
|
|
static const char TR_AUDIO_BACKEND_DESCRIPTION[] =
|
|
|
|
QT_TR_NOOP("Selects which audio API to use internally.<br><br><dolphin_emphasis>If unsure, "
|
|
|
|
"select %1.</dolphin_emphasis>");
|
|
|
|
static const char TR_LATENCY_SLIDER_DESCRIPTION[] = QT_TR_NOOP(
|
|
|
|
"Sets the audio latency in milliseconds. Higher values may reduce audio crackling. Certain "
|
|
|
|
"backends only.<br><br><dolphin_emphasis>If unsure, leave this at 20 ms.</dolphin_emphasis>");
|
|
|
|
static const char TR_DOLBY_DESCRIPTION[] =
|
|
|
|
QT_TR_NOOP("Enables Dolby Pro Logic II emulation using 5.1 surround. Certain backends only. "
|
|
|
|
"<br><br><dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
|
|
|
|
static const char TR_DOLBY_OPTIONS_DESCRIPTION[] = QT_TR_NOOP(
|
|
|
|
"Adjusts the quality setting of the Dolby Pro Logic II decoder. Higher presets increases "
|
|
|
|
"audio latency.<br><br><dolphin_emphasis>If unsure, select High.</dolphin_emphasis>");
|
|
|
|
static const char TR_VOLUME_DESCRIPTION[] =
|
|
|
|
QT_TR_NOOP("Adjusts audio output volume.<br><br><dolphin_emphasis>If unsure, leave this at "
|
|
|
|
"100%.</dolphin_emphasis>");
|
|
|
|
static const char TR_FILL_AUDIO_GAPS_DESCRIPTION[] = QT_TR_NOOP(
|
|
|
|
"Repeat existing audio during lag spikes to prevent stuttering.<br><br><dolphin_emphasis>If "
|
|
|
|
"unsure, leave this checked.</dolphin_emphasis>");
|
|
|
|
static const char TR_SPEED_UP_MUTE_DESCRIPTION[] =
|
|
|
|
QT_TR_NOOP("Mutes the audio when overriding the emulation speed limit (default hotkey: Tab). "
|
|
|
|
"<br><br><dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
|
|
|
|
|
|
|
|
m_dsp_combo->SetTitle(tr("DSP Emulation Engine"));
|
|
|
|
m_dsp_combo->SetDescription(tr(TR_DSP_DESCRIPTION));
|
|
|
|
|
|
|
|
m_backend_combo->SetTitle(tr("Audio Backend"));
|
|
|
|
m_backend_combo->SetDescription(
|
|
|
|
tr(TR_AUDIO_BACKEND_DESCRIPTION)
|
|
|
|
.arg(QString::fromStdString(AudioCommon::GetDefaultSoundBackend())));
|
|
|
|
|
|
|
|
m_dolby_pro_logic->SetTitle(tr("Dolby Pro Logic II Decoder"));
|
|
|
|
m_dolby_pro_logic->SetDescription(tr(TR_DOLBY_DESCRIPTION));
|
|
|
|
|
|
|
|
m_dolby_quality_combo->SetTitle(tr("Decoding Quality"));
|
|
|
|
m_dolby_quality_combo->SetDescription(tr(TR_DOLBY_OPTIONS_DESCRIPTION));
|
2019-03-18 08:22:27 -03:00
|
|
|
|
2024-10-10 17:00:41 -07:00
|
|
|
#ifdef _WIN32
|
2025-03-28 14:22:40 -07:00
|
|
|
static const char TR_WASAPI_DEVICE_DESCRIPTION[] =
|
|
|
|
QT_TR_NOOP("Selects an output device to use.<br><br><dolphin_emphasis>If unsure, select "
|
|
|
|
"Default Device.</dolphin_emphasis>");
|
2024-10-10 17:00:41 -07:00
|
|
|
m_wasapi_device_combo->SetTitle(tr("Output Device"));
|
|
|
|
m_wasapi_device_combo->SetDescription(tr(TR_WASAPI_DEVICE_DESCRIPTION));
|
|
|
|
#endif
|
2025-03-28 14:22:40 -07:00
|
|
|
|
2024-10-10 17:00:41 -07:00
|
|
|
m_volume_slider->SetTitle(tr("Volume"));
|
|
|
|
m_volume_slider->SetDescription(tr(TR_VOLUME_DESCRIPTION));
|
|
|
|
|
|
|
|
if (m_latency_control_supported)
|
2019-03-18 08:22:27 -03:00
|
|
|
{
|
2024-10-10 17:00:41 -07:00
|
|
|
m_latency_slider->SetTitle(tr("Latency"));
|
|
|
|
m_latency_slider->SetDescription(tr(TR_LATENCY_SLIDER_DESCRIPTION));
|
2019-03-18 08:22:27 -03:00
|
|
|
}
|
|
|
|
|
2024-10-10 17:00:41 -07:00
|
|
|
m_speed_up_mute_enable->SetTitle(tr("Mute When Disabling Speed Limit"));
|
|
|
|
m_speed_up_mute_enable->SetDescription(tr(TR_SPEED_UP_MUTE_DESCRIPTION));
|
|
|
|
|
|
|
|
m_audio_fill_gaps->SetTitle(tr("Fill Audio Gaps"));
|
|
|
|
m_audio_fill_gaps->SetDescription(tr(TR_FILL_AUDIO_GAPS_DESCRIPTION));
|
2019-03-18 08:22:27 -03:00
|
|
|
}
|