MCPcopy Create free account
hub / github.com/Lovrom8/RSMods / ApplyAudioDeviceConfiguration

Function ApplyAudioDeviceConfiguration

DLL/ModManager.cpp:159–169  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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>

Callers 1

ApplyStartupModsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected