Add Gaussian (SNES) audio interpolation

Probably not a good choice for most DS games unless you really want a
very soft sound, but it could be fun if you wanted to run lolSnes in
melonDS :p
This commit is contained in:
Nadia Holmquist Pedersen
2024-03-08 16:36:00 +01:00
parent e227902cec
commit faf3c0f2e0
4 changed files with 53 additions and 3 deletions

View File

@ -51,6 +51,7 @@ AudioSettingsDialog::AudioSettingsDialog(QWidget* parent, bool emuActive, EmuThr
ui->cbInterpolation->addItem("Linear");
ui->cbInterpolation->addItem("Cosine");
ui->cbInterpolation->addItem("Cubic");
ui->cbInterpolation->addItem("Gaussian (SNES)");
ui->cbInterpolation->setCurrentIndex(Config::AudioInterp);
ui->cbBitDepth->addItem("Automatic");
@ -173,7 +174,7 @@ void AudioSettingsDialog::on_cbBitDepth_currentIndexChanged(int idx)
void AudioSettingsDialog::on_cbInterpolation_currentIndexChanged(int idx)
{
// prevent a spurious change
if (ui->cbInterpolation->count() < 4) return;
if (ui->cbInterpolation->count() < 5) return;
Config::AudioInterp = ui->cbInterpolation->currentIndex();

View File

@ -348,7 +348,7 @@ int main(int argc, char** argv)
#endif
SANITIZE(Config::ScreenVSyncInterval, 1, 20);
SANITIZE(Config::GL_ScaleFactor, 1, 16);
SANITIZE(Config::AudioInterp, 0, 3);
SANITIZE(Config::AudioInterp, 0, 4);
SANITIZE(Config::AudioVolume, 0, 256);
SANITIZE(Config::MicInputType, 0, (int)micInputType_MAX);
SANITIZE(Config::ScreenRotation, 0, (int)Frontend::screenRot_MAX);