diff --git a/src/audio_core/hle/dsp.cpp b/src/audio_core/hle/dsp.cpp index 24a8d90af..31421fdc6 100644 --- a/src/audio_core/hle/dsp.cpp +++ b/src/audio_core/hle/dsp.cpp @@ -10,7 +10,6 @@ #include "audio_core/hle/source.h" #include "audio_core/sink.h" #include "audio_core/time_stretch.h" -#include "core/settings.h" namespace DSP { namespace HLE { @@ -90,15 +89,6 @@ static bool perform_time_stretching = true; static std::unique_ptr sink; static AudioCore::TimeStretcher time_stretcher; -static StereoFrame16 ChangeVolume(const StereoFrame16& frame) { - StereoFrame16 new_frame = StereoFrame16(); - for (int i = 0; i < frame.size(); i++) { - new_frame[i][0] = frame[i][0] * Settings::values.volume; - new_frame[i][1] = frame[i][1] * Settings::values.volume; - } - return new_frame; -} - static void FlushResidualStretcherAudio() { time_stretcher.Flush(); while (true) { @@ -110,9 +100,8 @@ static void FlushResidualStretcherAudio() { } static void OutputCurrentFrame(const StereoFrame16& frame) { - StereoFrame16 new_frame = ChangeVolume(frame); if (perform_time_stretching) { - time_stretcher.AddSamples(&new_frame[0][0], frame.size()); + time_stretcher.AddSamples(&frame[0][0], frame.size()); std::vector stretched_samples = time_stretcher.Process(sink->SamplesInQueue()); sink->EnqueueSamples(stretched_samples.data(), stretched_samples.size() / 2); } else { @@ -123,7 +112,7 @@ static void OutputCurrentFrame(const StereoFrame16& frame) { return; } - sink->EnqueueSamples(&new_frame[0][0], frame.size()); + sink->EnqueueSamples(&frame[0][0], frame.size()); } } diff --git a/src/citra/config.cpp b/src/citra/config.cpp index e5e6d216a..ef1229912 100644 --- a/src/citra/config.cpp +++ b/src/citra/config.cpp @@ -100,7 +100,6 @@ void Config::ReadValues() { Settings::values.enable_audio_stretching = sdl2_config->GetBoolean("Audio", "enable_audio_stretching", true); Settings::values.audio_device_id = sdl2_config->Get("Audio", "output_device", "auto"); - Settings::values.volume = sdl2_config->GetReal("Audio", "volume", 1); // Data Storage Settings::values.use_virtual_sd = diff --git a/src/citra/default_ini.h b/src/citra/default_ini.h index 5f5dabd52..af9f7aa2a 100644 --- a/src/citra/default_ini.h +++ b/src/citra/default_ini.h @@ -108,10 +108,6 @@ enable_audio_stretching = # auto (default): Auto-select output_device = -# Output volume. -# 1.0 (default): 100%, 0.0; mute -volume = - [Data Storage] # Whether to create a virtual SD card. # 1 (default): Yes, 0: No diff --git a/src/citra_qt/config.cpp b/src/citra_qt/config.cpp index b9ec351fc..6ccfa1577 100644 --- a/src/citra_qt/config.cpp +++ b/src/citra_qt/config.cpp @@ -87,7 +87,6 @@ void Config::ReadValues() { qt_config->value("enable_audio_stretching", true).toBool(); Settings::values.audio_device_id = qt_config->value("output_device", "auto").toString().toStdString(); - Settings::values.volume = qt_config->value("volume", 1).toFloat(); qt_config->endGroup(); using namespace Service::CAM; @@ -214,7 +213,6 @@ void Config::SaveValues() { qt_config->setValue("output_engine", QString::fromStdString(Settings::values.sink_id)); qt_config->setValue("enable_audio_stretching", Settings::values.enable_audio_stretching); qt_config->setValue("output_device", QString::fromStdString(Settings::values.audio_device_id)); - qt_config->setValue("volume", Settings::values.volume); qt_config->endGroup(); using namespace Service::CAM; diff --git a/src/citra_qt/configure_audio.cpp b/src/citra_qt/configure_audio.cpp index 0247cac1d..3ddcf9232 100644 --- a/src/citra_qt/configure_audio.cpp +++ b/src/citra_qt/configure_audio.cpp @@ -51,7 +51,6 @@ void ConfigureAudio::setConfiguration() { } } ui->audio_device_combo_box->setCurrentIndex(new_device_index); - ui->volume_slider->setValue(Settings::values.volume * ui->volume_slider->maximum()); } void ConfigureAudio::applyConfiguration() { @@ -62,8 +61,6 @@ void ConfigureAudio::applyConfiguration() { Settings::values.audio_device_id = ui->audio_device_combo_box->itemText(ui->audio_device_combo_box->currentIndex()) .toStdString(); - Settings::values.volume = (float)ui->volume_slider->value() / ui->volume_slider->maximum(); - Settings::Apply(); } diff --git a/src/citra_qt/configure_audio.ui b/src/citra_qt/configure_audio.ui index b72def8a6..dd870eb61 100644 --- a/src/citra_qt/configure_audio.ui +++ b/src/citra_qt/configure_audio.ui @@ -46,33 +46,6 @@ - - - - - - - - - - Volume: - - - - - - - 1023 - - - 1 - - - 0 - - - Qt::Horizontal - diff --git a/src/core/settings.h b/src/core/settings.h index 713696e7a..d1a9f0da8 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -110,7 +110,6 @@ struct Values { std::string sink_id; bool enable_audio_stretching; std::string audio_device_id; - float volume; // Camera std::array camera_name;