nsyshid: Play Emulated Portal Audio via Mono Audio (#1478)
Some checks failed
Build check / build (push) Waiting to run
Generate translation template / generate-pot (push) Failing after 42s

This commit is contained in:
Joshua de Reeper 2025-06-19 23:30:19 +02:00 committed by GitHub
parent 00ff5549d9
commit 4f4412b334
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 254 additions and 41 deletions

View file

@ -278,6 +278,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
tv_volume = audio.get("TVVolume", 20);
pad_volume = audio.get("PadVolume", 0);
input_volume = audio.get("InputVolume", 20);
portal_volume = audio.get("PortalVolume", 20);
const auto tv = audio.get("TVDevice", "");
try
@ -309,6 +310,16 @@ void CemuConfig::Load(XMLConfigParser& parser)
cemuLog_log(LogType::Force, "config load error: can't load input device: {}", input_device_name);
}
const auto portal_device_name = audio.get("PortalDevice", "");
try
{
portal_device = boost::nowide::widen(portal_device_name);
}
catch (const std::exception&)
{
cemuLog_log(LogType::Force, "config load error: can't load input device: {}", portal_device_name);
}
// account
auto acc = parser.get("Account");
account.m_persistent_id = acc.get("PersistentId", account.m_persistent_id);
@ -511,9 +522,11 @@ void CemuConfig::Save(XMLConfigParser& parser)
audio.set("TVVolume", tv_volume);
audio.set("PadVolume", pad_volume);
audio.set("InputVolume", input_volume);
audio.set("PortalVolume", portal_volume);
audio.set("TVDevice", boost::nowide::narrow(tv_device).c_str());
audio.set("PadDevice", boost::nowide::narrow(pad_device).c_str());
audio.set("InputDevice", boost::nowide::narrow(input_device).c_str());
audio.set("PortalDevice", boost::nowide::narrow(portal_device).c_str());
// account
auto acc = config.set("Account");

View file

@ -480,8 +480,8 @@ struct CemuConfig
sint32 audio_api = 0;
sint32 audio_delay = 2;
AudioChannels tv_channels = kStereo, pad_channels = kStereo, input_channels = kMono;
sint32 tv_volume = 50, pad_volume = 0, input_volume = 50;
std::wstring tv_device{ L"default" }, pad_device, input_device;
sint32 tv_volume = 50, pad_volume = 0, input_volume = 50, portal_volume = 50;
std::wstring tv_device{ L"default" }, pad_device, input_device, portal_device;
// account
struct