diff --git a/src/Context.cpp b/src/Context.cpp index ad4e1d657..2a5f91bff 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -44,11 +44,11 @@ std::shared_ptr Context::CreateInstance(const std::string name, const s const std::string configFilePath, const std::vector& otrFiles, const std::unordered_set& validHashes, - uint32_t reservedThreadCount) { + uint32_t reservedThreadCount, AudioSettings audioSettings) { if (mContext.expired()) { auto shared = std::make_shared(name, shortName, configFilePath); mContext = shared; - shared->Init(otrFiles, validHashes, reservedThreadCount); + shared->Init(otrFiles, validHashes, reservedThreadCount, audioSettings); return shared; } @@ -75,7 +75,7 @@ Context::Context(std::string name, std::string shortName, std::string configFile } void Context::Init(const std::vector& otrFiles, const std::unordered_set& validHashes, - uint32_t reservedThreadCount) { + uint32_t reservedThreadCount, AudioSettings audioSettings) { InitLogging(); InitConfiguration(); InitConsoleVariables(); @@ -84,7 +84,7 @@ void Context::Init(const std::vector& otrFiles, const std::unordere InitCrashHandler(); InitConsole(); InitWindow(); - InitAudio(); + InitAudio(audioSettings); InitGfxDebugger(); } @@ -227,12 +227,12 @@ void Context::InitCrashHandler() { mCrashHandler = std::make_shared(); } -void Context::InitAudio() { +void Context::InitAudio(AudioSettings settings) { if (GetAudio() != nullptr) { return; } - mAudio = std::make_shared