summaryrefslogtreecommitdiff
path: root/src/audio_core/renderer/system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_core/renderer/system.cpp')
-rw-r--r--src/audio_core/renderer/system.cpp10
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 @@
32#include "core/core.h" 32#include "core/core.h"
33#include "core/core_timing.h" 33#include "core/core_timing.h"
34#include "core/hle/kernel/k_event.h" 34#include "core/hle/kernel/k_event.h"
35#include "core/hle/kernel/k_process.h"
35#include "core/hle/kernel/k_transfer_memory.h" 36#include "core/hle/kernel/k_transfer_memory.h"
36#include "core/memory.h" 37#include "core/memory.h"
37 38
@@ -101,7 +102,8 @@ System::System(Core::System& core_, Kernel::KEvent* adsp_rendered_event_)
101 102
102Result System::Initialize(const AudioRendererParameterInternal& params, 103Result System::Initialize(const AudioRendererParameterInternal& params,
103 Kernel::KTransferMemory* transfer_memory, u64 transfer_memory_size, 104 Kernel::KTransferMemory* transfer_memory, u64 transfer_memory_size,
104 u32 process_handle_, u64 applet_resource_user_id_, s32 session_id_) { 105 u32 process_handle_, Kernel::KProcess& process_,
106 u64 applet_resource_user_id_, s32 session_id_) {
105 if (!CheckValidRevision(params.revision)) { 107 if (!CheckValidRevision(params.revision)) {
106 return Service::Audio::ResultInvalidRevision; 108 return Service::Audio::ResultInvalidRevision;
107 } 109 }
@@ -117,6 +119,7 @@ Result System::Initialize(const AudioRendererParameterInternal& params,
117 behavior.SetUserLibRevision(params.revision); 119 behavior.SetUserLibRevision(params.revision);
118 120
119 process_handle = process_handle_; 121 process_handle = process_handle_;
122 process = &process_;
120 applet_resource_user_id = applet_resource_user_id_; 123 applet_resource_user_id = applet_resource_user_id_;
121 session_id = session_id_; 124 session_id = session_id_;
122 125
@@ -129,7 +132,7 @@ Result System::Initialize(const AudioRendererParameterInternal& params,
129 render_device = params.rendering_device; 132 render_device = params.rendering_device;
130 execution_mode = params.execution_mode; 133 execution_mode = params.execution_mode;
131 134
132 core.ApplicationMemory().ZeroBlock(transfer_memory->GetSourceAddress(), transfer_memory_size); 135 process->GetMemory().ZeroBlock(transfer_memory->GetSourceAddress(), transfer_memory_size);
133 136
134 // Note: We're not actually using the transfer memory because it's a pain to code for. 137 // Note: We're not actually using the transfer memory because it's a pain to code for.
135 // Allocate the memory normally instead and hope the game doesn't try to read anything back 138 // Allocate the memory normally instead and hope the game doesn't try to read anything back
@@ -613,7 +616,8 @@ void System::SendCommandToDsp() {
613 static_cast<u64>((time_limit_percent / 100) * 2'880'000.0 * 616 static_cast<u64>((time_limit_percent / 100) * 2'880'000.0 *
614 (static_cast<f32>(render_time_limit_percent) / 100.0f))}; 617 (static_cast<f32>(render_time_limit_percent) / 100.0f))};
615 audio_renderer.SetCommandBuffer(session_id, translated_addr, command_size, time_limit, 618 audio_renderer.SetCommandBuffer(session_id, translated_addr, command_size, time_limit,
616 applet_resource_user_id, reset_command_buffers); 619 applet_resource_user_id, process,
620 reset_command_buffers);
617 reset_command_buffers = false; 621 reset_command_buffers = false;
618 command_buffer_size = command_size; 622 command_buffer_size = command_size;
619 if (remaining_command_count == 0) { 623 if (remaining_command_count == 0) {