Configures audio device settings including sample rates. We have to do this early in execution as we need to change it before the audio engine starts up.
| 157 | /// We have to do this early in execution as we need to change it before the audio engine starts up. |
| 158 | /// </summary> |
| 159 | void ApplyAudioDeviceConfiguration() |
| 160 | { |
| 161 | Midi::tuningOffset = Settings::GetModSetting("TuningOffset"); |
| 162 | |
| 163 | if (Settings::ReturnSettingValue("AltOutputSampleRate") == "on" && |
| 164 | Settings::GetModSetting("AlternativeOutputSampleRate") != 48000) { |
| 165 | LOG_WARNING("[!] Overriding Output Sample Rate to " << Settings::GetModSetting("AlternativeOutputSampleRate") << std::endl); |
| 166 | AudioDevices::output_SampleRate = Settings::GetModSetting("AlternativeOutputSampleRate"); |
| 167 | AudioDevices::ChangeOutputSampleRate(); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | |
| 172 | /// <summary> |