mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-03 13:31:18 +12:00
nsyshid: Play Emulated Portal Audio via Mono Audio (#1478)
This commit is contained in:
parent
00ff5549d9
commit
4f4412b334
9 changed files with 254 additions and 41 deletions
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue