diff options
author | Nadia Holmquist Pedersen <nadia@nhp.sh> | 2023-06-24 16:34:23 +0200 |
---|---|---|
committer | Nadia Holmquist Pedersen <nadia@nhp.sh> | 2023-06-24 16:34:23 +0200 |
commit | 4b32fb802c1e3e30bbdc1825828611d5a166b57f (patch) | |
tree | d60440394552ffa28c0c19ae343b20c39b75fd08 | |
parent | 74b166cba3560102359ff65924d60b8dfaf0dd27 (diff) |
actually rename that setting
-rw-r--r-- | src/NDS.cpp | 6 | ||||
-rw-r--r-- | src/Platform.h | 2 | ||||
-rw-r--r-- | src/frontend/qt_sdl/AudioSettingsDialog.cpp | 20 | ||||
-rw-r--r-- | src/frontend/qt_sdl/AudioSettingsDialog.h | 4 | ||||
-rw-r--r-- | src/frontend/qt_sdl/AudioSettingsDialog.ui | 8 | ||||
-rw-r--r-- | src/frontend/qt_sdl/Config.cpp | 4 | ||||
-rw-r--r-- | src/frontend/qt_sdl/Config.h | 2 | ||||
-rw-r--r-- | src/frontend/qt_sdl/Platform.cpp | 2 | ||||
-rw-r--r-- | src/frontend/qt_sdl/main.cpp | 4 |
9 files changed, 26 insertions, 26 deletions
diff --git a/src/NDS.cpp b/src/NDS.cpp index e37a194..7bf94f8 100644 --- a/src/NDS.cpp +++ b/src/NDS.cpp @@ -674,10 +674,10 @@ void Reset() degradeAudio = false; } - int bitrate = Platform::GetConfigInt(Platform::AudioBitrate); - if (bitrate == 1) // Always 10-bit + int bitDepth = Platform::GetConfigInt(Platform::AudioBitDepth); + if (bitDepth == 1) // Always 10-bit degradeAudio = true; - else if (bitrate == 2) // Always 16-bit + else if (bitDepth == 2) // Always 16-bit degradeAudio = false; SPU::SetDegrade10Bit(degradeAudio); diff --git a/src/Platform.h b/src/Platform.h index e996dea..a4a492c 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -82,7 +82,7 @@ enum ConfigEntry Firm_Message, Firm_MAC, - AudioBitrate, + AudioBitDepth, }; int GetConfigInt(ConfigEntry entry); diff --git a/src/frontend/qt_sdl/AudioSettingsDialog.cpp b/src/frontend/qt_sdl/AudioSettingsDialog.cpp index 5d8f2fb..0a6002c 100644 --- a/src/frontend/qt_sdl/AudioSettingsDialog.cpp +++ b/src/frontend/qt_sdl/AudioSettingsDialog.cpp @@ -40,7 +40,7 @@ AudioSettingsDialog::AudioSettingsDialog(QWidget* parent, bool emuActive) : QDia setAttribute(Qt::WA_DeleteOnClose); oldInterp = Config::AudioInterp; - oldBitrate = Config::AudioBitrate; + oldBitDepth = Config::AudioBitDepth; oldVolume = Config::AudioVolume; oldDSiSync = Config::DSiVolumeSync; @@ -50,10 +50,10 @@ AudioSettingsDialog::AudioSettingsDialog(QWidget* parent, bool emuActive) : QDia ui->cbInterpolation->addItem("Cubic"); ui->cbInterpolation->setCurrentIndex(Config::AudioInterp); - ui->cbBitrate->addItem("Automatic"); - ui->cbBitrate->addItem("10-bit"); - ui->cbBitrate->addItem("16-bit"); - ui->cbBitrate->setCurrentIndex(Config::AudioBitrate); + ui->cbBitDepth->addItem("Automatic"); + ui->cbBitDepth->addItem("10-bit"); + ui->cbBitDepth->addItem("16-bit"); + ui->cbBitDepth->setCurrentIndex(Config::AudioBitDepth); bool state = ui->slVolume->blockSignals(true); ui->slVolume->setValue(Config::AudioVolume); @@ -90,7 +90,7 @@ AudioSettingsDialog::AudioSettingsDialog(QWidget* parent, bool emuActive) : QDia { ui->lblInstanceNum->setText(QString("Configuring settings for instance %1").arg(inst+1)); ui->cbInterpolation->setEnabled(false); - ui->cbBitrate->setEnabled(false); + ui->cbBitDepth->setEnabled(false); for (QAbstractButton* btn : grpMicMode->buttons()) btn->setEnabled(false); ui->txtMicWavPath->setEnabled(false); @@ -133,19 +133,19 @@ void AudioSettingsDialog::on_AudioSettingsDialog_accepted() void AudioSettingsDialog::on_AudioSettingsDialog_rejected() { Config::AudioInterp = oldInterp; - Config::AudioBitrate = oldBitrate; + Config::AudioBitDepth = oldBitDepth; Config::AudioVolume = oldVolume; Config::DSiVolumeSync = oldDSiSync; closeDlg(); } -void AudioSettingsDialog::on_cbBitrate_currentIndexChanged(int idx) +void AudioSettingsDialog::on_cbBitDepth_currentIndexChanged(int idx) { // prevent a spurious change - if (ui->cbBitrate->count() < 3) return; + if (ui->cbBitDepth->count() < 3) return; - Config::AudioBitrate = ui->cbBitrate->currentIndex(); + Config::AudioBitDepth = ui->cbBitDepth->currentIndex(); emit updateAudioSettings(); } diff --git a/src/frontend/qt_sdl/AudioSettingsDialog.h b/src/frontend/qt_sdl/AudioSettingsDialog.h index 14d1ad3..aa99441 100644 --- a/src/frontend/qt_sdl/AudioSettingsDialog.h +++ b/src/frontend/qt_sdl/AudioSettingsDialog.h @@ -62,7 +62,7 @@ private slots: void on_AudioSettingsDialog_rejected(); void on_cbInterpolation_currentIndexChanged(int idx); - void on_cbBitrate_currentIndexChanged(int idx); + void on_cbBitDepth_currentIndexChanged(int idx); void on_slVolume_valueChanged(int val); void on_chkSyncDSiVolume_clicked(bool checked); void onChangeMicMode(int mode); @@ -72,7 +72,7 @@ private: Ui::AudioSettingsDialog* ui; int oldInterp; - int oldBitrate; + int oldBitDepth; int oldVolume; bool oldDSiSync; QButtonGroup* grpMicMode; diff --git a/src/frontend/qt_sdl/AudioSettingsDialog.ui b/src/frontend/qt_sdl/AudioSettingsDialog.ui index b6f37c7..e57ce8c 100644 --- a/src/frontend/qt_sdl/AudioSettingsDialog.ui +++ b/src/frontend/qt_sdl/AudioSettingsDialog.ui @@ -86,14 +86,14 @@ <item row="1" column="0"> <widget class="QLabel" name="label_3"> <property name="text"> - <string>Bitrate:</string> + <string>Bit depth:</string> </property> </widget> </item> <item row="1" column="1"> - <widget class="QComboBox" name="cbBitrate"> + <widget class="QComboBox" name="cbBitDepth"> <property name="whatsThis"> - <string><html><head/><body><p>The bitrate of audio playback. If set to "Automatic" this will be 10-bit for DS mode and 16-bit for DSi mode.</p></body></html></string> + <string><html><head/><body><p>The bit depth of audio playback. If set to "Automatic" this will be 10-bit for DS mode and 16-bit for DSi mode.</p></body></html></string> </property> </widget> </item> @@ -190,7 +190,7 @@ </customwidgets> <tabstops> <tabstop>cbInterpolation</tabstop> - <tabstop>cbBitrate</tabstop> + <tabstop>cbBitDepth</tabstop> <tabstop>slVolume</tabstop> <tabstop>chkSyncDSiVolume</tabstop> <tabstop>rbMicNone</tabstop> diff --git a/src/frontend/qt_sdl/Config.cpp b/src/frontend/qt_sdl/Config.cpp index 49c41a1..217d0d7 100644 --- a/src/frontend/qt_sdl/Config.cpp +++ b/src/frontend/qt_sdl/Config.cpp @@ -116,7 +116,7 @@ bool DirectLAN; bool SavestateRelocSRAM; int AudioInterp; -int AudioBitrate; +int AudioBitDepth; int AudioVolume; bool DSiVolumeSync; int MicInputType; @@ -296,7 +296,7 @@ ConfigEntry ConfigFile[] = {"SavStaRelocSRAM", 1, &SavestateRelocSRAM, false, false}, {"AudioInterp", 0, &AudioInterp, 0, false}, - {"AudioBitrate", 0, &AudioBitrate, 0, false}, + {"AudioBitDepth", 0, &AudioBitDepth, 0, false}, {"AudioVolume", 0, &AudioVolume, 256, true}, {"DSiVolumeSync", 0, &DSiVolumeSync, 0, true}, {"MicInputType", 0, &MicInputType, 1, false}, diff --git a/src/frontend/qt_sdl/Config.h b/src/frontend/qt_sdl/Config.h index 2028879..ba8d345 100644 --- a/src/frontend/qt_sdl/Config.h +++ b/src/frontend/qt_sdl/Config.h @@ -173,7 +173,7 @@ extern bool DirectLAN; extern bool SavestateRelocSRAM; extern int AudioInterp; -extern int AudioBitrate; +extern int AudioBitDepth; extern int AudioVolume; extern bool DSiVolumeSync; extern int MicInputType; diff --git a/src/frontend/qt_sdl/Platform.cpp b/src/frontend/qt_sdl/Platform.cpp index f626c88..be6b6f6 100644 --- a/src/frontend/qt_sdl/Platform.cpp +++ b/src/frontend/qt_sdl/Platform.cpp @@ -191,7 +191,7 @@ int GetConfigInt(ConfigEntry entry) case Firm_BirthdayDay: return Config::FirmwareBirthdayDay; case Firm_Color: return Config::FirmwareFavouriteColour; - case AudioBitrate: return Config::AudioBitrate; + case AudioBitDepth: return Config::AudioBitDepth; } return 0; diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index 4ed7d3f..33803dd 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -2905,10 +2905,10 @@ void MainWindow::onUpdateAudioSettings() { SPU::SetInterpolation(Config::AudioInterp); - if (Config::AudioBitrate == 0) + if (Config::AudioBitDepth == 0) SPU::SetDegrade10Bit(NDS::ConsoleType == 0); else - SPU::SetDegrade10Bit(Config::AudioBitrate == 1); + SPU::SetDegrade10Bit(Config::AudioBitDepth == 1); } void MainWindow::onAudioSettingsFinished(int res) |