diff options
author | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2024-01-28 18:45:01 +0100 |
---|---|---|
committer | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2024-01-28 19:51:43 +0100 |
commit | 19a2f12692f2ba871b4bec7c56757a455bf03e7d (patch) | |
tree | 52aa105751bffd4b9bb671e307c3922bc0d0a6a0 /src/audio_core/renderer/system.cpp | |
parent | Merge pull request #12808 from t895/uri-moment (diff) | |
download | yuzu-19a2f12692f2ba871b4bec7c56757a455bf03e7d.tar yuzu-19a2f12692f2ba871b4bec7c56757a455bf03e7d.tar.gz yuzu-19a2f12692f2ba871b4bec7c56757a455bf03e7d.tar.bz2 yuzu-19a2f12692f2ba871b4bec7c56757a455bf03e7d.tar.lz yuzu-19a2f12692f2ba871b4bec7c56757a455bf03e7d.tar.xz yuzu-19a2f12692f2ba871b4bec7c56757a455bf03e7d.tar.zst yuzu-19a2f12692f2ba871b4bec7c56757a455bf03e7d.zip |
Diffstat (limited to 'src/audio_core/renderer/system.cpp')
-rw-r--r-- | src/audio_core/renderer/system.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/audio_core/renderer/system.cpp b/src/audio_core/renderer/system.cpp index 31f92087c..ca656edae 100644 --- a/src/audio_core/renderer/system.cpp +++ b/src/audio_core/renderer/system.cpp @@ -32,6 +32,7 @@ #include "core/core.h" #include "core/core_timing.h" #include "core/hle/kernel/k_event.h" +#include "core/hle/kernel/k_process.h" #include "core/hle/kernel/k_transfer_memory.h" #include "core/memory.h" @@ -101,7 +102,8 @@ System::System(Core::System& core_, Kernel::KEvent* adsp_rendered_event_) Result System::Initialize(const AudioRendererParameterInternal& params, Kernel::KTransferMemory* transfer_memory, u64 transfer_memory_size, - u32 process_handle_, u64 applet_resource_user_id_, s32 session_id_) { + u32 process_handle_, Kernel::KProcess& process_, + u64 applet_resource_user_id_, s32 session_id_) { if (!CheckValidRevision(params.revision)) { return Service::Audio::ResultInvalidRevision; } @@ -117,6 +119,7 @@ Result System::Initialize(const AudioRendererParameterInternal& params, behavior.SetUserLibRevision(params.revision); process_handle = process_handle_; + process = &process_; applet_resource_user_id = applet_resource_user_id_; session_id = session_id_; @@ -129,7 +132,7 @@ Result System::Initialize(const AudioRendererParameterInternal& params, render_device = params.rendering_device; execution_mode = params.execution_mode; - core.ApplicationMemory().ZeroBlock(transfer_memory->GetSourceAddress(), transfer_memory_size); + process->GetMemory().ZeroBlock(transfer_memory->GetSourceAddress(), transfer_memory_size); // Note: We're not actually using the transfer memory because it's a pain to code for. // Allocate the memory normally instead and hope the game doesn't try to read anything back @@ -613,7 +616,8 @@ void System::SendCommandToDsp() { static_cast<u64>((time_limit_percent / 100) * 2'880'000.0 * (static_cast<f32>(render_time_limit_percent) / 100.0f))}; audio_renderer.SetCommandBuffer(session_id, translated_addr, command_size, time_limit, - applet_resource_user_id, reset_command_buffers); + applet_resource_user_id, process, + reset_command_buffers); reset_command_buffers = false; command_buffer_size = command_size; if (remaining_command_count == 0) { |