feat: Add an option to preserve audio pitch when emulation speed changes, integrating it into core configuration and both Qt and Android UIs.
This commit is contained in:
@@ -181,6 +181,9 @@ void AudioPane::CreateWidgets()
|
||||
|
||||
m_audio_fill_gaps = new ConfigBool(tr("Fill Audio Gaps"), Config::MAIN_AUDIO_FILL_GAPS);
|
||||
|
||||
m_audio_preserve_pitch =
|
||||
new ConfigBool(tr("Preserve Audio Pitch"), Config::MAIN_AUDIO_PRESERVE_PITCH);
|
||||
|
||||
m_speed_up_mute_enable = new ConfigBool(tr("Mute When Disabling Speed Limit"),
|
||||
Config::MAIN_AUDIO_MUTE_ON_DISABLED_SPEED_LIMIT);
|
||||
|
||||
@@ -192,8 +195,9 @@ void AudioPane::CreateWidgets()
|
||||
|
||||
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_layout->addWidget(m_audio_preserve_pitch, 2, 0);
|
||||
playback_layout->addWidget(m_speed_up_mute_enable, 3, 0);
|
||||
playback_layout->setRowStretch(4, 1);
|
||||
playback_box->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
|
||||
auto* const main_vbox_layout = new QVBoxLayout;
|
||||
@@ -317,6 +321,10 @@ void AudioPane::AddDescriptions()
|
||||
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_PRESERVE_AUDIO_PITCH_DESCRIPTION[] = QT_TR_NOOP(
|
||||
"Keeps audio at normal pitch when changing emulation speed. Without this, audio pitch "
|
||||
"changes proportionally with speed.<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"unchecked.</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>");
|
||||
@@ -357,4 +365,7 @@ void AudioPane::AddDescriptions()
|
||||
|
||||
m_audio_fill_gaps->SetTitle(tr("Fill Audio Gaps"));
|
||||
m_audio_fill_gaps->SetDescription(tr(TR_FILL_AUDIO_GAPS_DESCRIPTION));
|
||||
|
||||
m_audio_preserve_pitch->SetTitle(tr("Preserve Audio Pitch"));
|
||||
m_audio_preserve_pitch->SetDescription(tr(TR_PRESERVE_AUDIO_PITCH_DESCRIPTION));
|
||||
}
|
||||
|
||||
@@ -66,5 +66,6 @@ private:
|
||||
|
||||
// Misc Settings
|
||||
ConfigBool* m_audio_fill_gaps;
|
||||
ConfigBool* m_audio_preserve_pitch;
|
||||
ConfigBool* m_speed_up_mute_enable;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user