yuzu-emu
/
yuzu
Archived
1
0
Fork 0

hle: service: hwopus: Implement GetWorkBufferSizeEx and OpenHardwareOpusDecoderEx.

- This is used by the latest update of Doom Eternal.
This commit is contained in:
bunnei 2021-06-24 18:25:37 -07:00
parent d1ba4a2db2
commit 3565e32f4d
2 changed files with 15 additions and 5 deletions

View File

@ -253,7 +253,11 @@ void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) {
rb.Push<u32>(worker_buffer_sz); rb.Push<u32>(worker_buffer_sz);
} }
void HwOpus::OpenOpusDecoder(Kernel::HLERequestContext& ctx) { void HwOpus::GetWorkBufferSizeEx(Kernel::HLERequestContext& ctx) {
GetWorkBufferSize(ctx);
}
void HwOpus::OpenHardwareOpusDecoder(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx}; IPC::RequestParser rp{ctx};
const auto sample_rate = rp.Pop<u32>(); const auto sample_rate = rp.Pop<u32>();
const auto channel_count = rp.Pop<u32>(); const auto channel_count = rp.Pop<u32>();
@ -291,14 +295,18 @@ void HwOpus::OpenOpusDecoder(Kernel::HLERequestContext& ctx) {
system, OpusDecoderState{std::move(decoder), sample_rate, channel_count}); system, OpusDecoderState{std::move(decoder), sample_rate, channel_count});
} }
void HwOpus::OpenHardwareOpusDecoderEx(Kernel::HLERequestContext& ctx) {
OpenHardwareOpusDecoder(ctx);
}
HwOpus::HwOpus(Core::System& system_) : ServiceFramework{system_, "hwopus"} { HwOpus::HwOpus(Core::System& system_) : ServiceFramework{system_, "hwopus"} {
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, &HwOpus::OpenOpusDecoder, "OpenOpusDecoder"}, {0, &HwOpus::OpenHardwareOpusDecoder, "OpenHardwareOpusDecoder"},
{1, &HwOpus::GetWorkBufferSize, "GetWorkBufferSize"}, {1, &HwOpus::GetWorkBufferSize, "GetWorkBufferSize"},
{2, nullptr, "OpenOpusDecoderForMultiStream"}, {2, nullptr, "OpenOpusDecoderForMultiStream"},
{3, nullptr, "GetWorkBufferSizeForMultiStream"}, {3, nullptr, "GetWorkBufferSizeForMultiStream"},
{4, nullptr, "OpenHardwareOpusDecoderEx"}, {4, &HwOpus::OpenHardwareOpusDecoderEx, "OpenHardwareOpusDecoderEx"},
{5, nullptr, "GetWorkBufferSizeEx"}, {5, &HwOpus::GetWorkBufferSizeEx, "GetWorkBufferSizeEx"},
{6, nullptr, "OpenHardwareOpusDecoderForMultiStreamEx"}, {6, nullptr, "OpenHardwareOpusDecoderForMultiStreamEx"},
{7, nullptr, "GetWorkBufferSizeForMultiStreamEx"}, {7, nullptr, "GetWorkBufferSizeForMultiStreamEx"},
}; };

View File

@ -18,8 +18,10 @@ public:
~HwOpus() override; ~HwOpus() override;
private: private:
void OpenOpusDecoder(Kernel::HLERequestContext& ctx); void OpenHardwareOpusDecoder(Kernel::HLERequestContext& ctx);
void OpenHardwareOpusDecoderEx(Kernel::HLERequestContext& ctx);
void GetWorkBufferSize(Kernel::HLERequestContext& ctx); void GetWorkBufferSize(Kernel::HLERequestContext& ctx);
void GetWorkBufferSizeEx(Kernel::HLERequestContext& ctx);
}; };
} // namespace Service::Audio } // namespace Service::Audio