diff options
author | Liam <byteslice@airmail.cc> | 2023-12-25 01:20:43 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-12-25 01:20:43 +0100 |
commit | 5165ed9efd6e6593b969ce560c952e074f4d9e06 (patch) | |
tree | 59966aa2ac0bd9186f7358af41f3888cbf89ec16 /src/core/hle/service/audio | |
parent | Merge pull request #12394 from liamwhite/per-process-memory (diff) | |
download | yuzu-5165ed9efd6e6593b969ce560c952e074f4d9e06.tar yuzu-5165ed9efd6e6593b969ce560c952e074f4d9e06.tar.gz yuzu-5165ed9efd6e6593b969ce560c952e074f4d9e06.tar.bz2 yuzu-5165ed9efd6e6593b969ce560c952e074f4d9e06.tar.lz yuzu-5165ed9efd6e6593b969ce560c952e074f4d9e06.tar.xz yuzu-5165ed9efd6e6593b969ce560c952e074f4d9e06.tar.zst yuzu-5165ed9efd6e6593b969ce560c952e074f4d9e06.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/audio/audren_u.cpp | 6 | ||||
-rw-r--r-- | src/core/hle/service/audio/hwopus.cpp | 16 |
2 files changed, 6 insertions, 16 deletions
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index 23e56c77a..bd4ca753b 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp @@ -454,10 +454,8 @@ void AudRenU::OpenAudioRenderer(HLERequestContext& ctx) { return; } - const auto& handle_table{system.ApplicationProcess()->GetHandleTable()}; - auto process{handle_table.GetObject<Kernel::KProcess>(process_handle)}; - auto transfer_memory{ - process->GetHandleTable().GetObject<Kernel::KTransferMemory>(transfer_memory_handle)}; + auto process{ctx.GetObjectFromHandle<Kernel::KProcess>(process_handle)}; + auto transfer_memory{ctx.GetObjectFromHandle<Kernel::KTransferMemory>(transfer_memory_handle)}; const auto session_id{impl->GetSessionId()}; if (session_id == -1) { diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index 6a7bf9416..91f33aabd 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp @@ -278,9 +278,7 @@ void HwOpus::OpenHardwareOpusDecoder(HLERequestContext& ctx) { auto params = rp.PopRaw<OpusParameters>(); auto transfer_memory_size{rp.Pop<u32>()}; auto transfer_memory_handle{ctx.GetCopyHandle(0)}; - auto transfer_memory{ - system.ApplicationProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>( - transfer_memory_handle)}; + auto transfer_memory{ctx.GetObjectFromHandle<Kernel::KTransferMemory>(transfer_memory_handle)}; LOG_DEBUG(Service_Audio, "sample_rate {} channel_count {} transfer_memory_size 0x{:X}", params.sample_rate, params.channel_count, transfer_memory_size); @@ -323,9 +321,7 @@ void HwOpus::OpenHardwareOpusDecoderForMultiStream(HLERequestContext& ctx) { auto transfer_memory_size{rp.Pop<u32>()}; auto transfer_memory_handle{ctx.GetCopyHandle(0)}; - auto transfer_memory{ - system.ApplicationProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>( - transfer_memory_handle)}; + auto transfer_memory{ctx.GetObjectFromHandle<Kernel::KTransferMemory>(transfer_memory_handle)}; LOG_DEBUG(Service_Audio, "sample_rate {} channel_count {} total_stream_count {} stereo_stream_count {} " @@ -374,9 +370,7 @@ void HwOpus::OpenHardwareOpusDecoderEx(HLERequestContext& ctx) { auto params = rp.PopRaw<OpusParametersEx>(); auto transfer_memory_size{rp.Pop<u32>()}; auto transfer_memory_handle{ctx.GetCopyHandle(0)}; - auto transfer_memory{ - system.ApplicationProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>( - transfer_memory_handle)}; + auto transfer_memory{ctx.GetObjectFromHandle<Kernel::KTransferMemory>(transfer_memory_handle)}; LOG_DEBUG(Service_Audio, "sample_rate {} channel_count {} transfer_memory_size 0x{:X}", params.sample_rate, params.channel_count, transfer_memory_size); @@ -414,9 +408,7 @@ void HwOpus::OpenHardwareOpusDecoderForMultiStreamEx(HLERequestContext& ctx) { auto transfer_memory_size{rp.Pop<u32>()}; auto transfer_memory_handle{ctx.GetCopyHandle(0)}; - auto transfer_memory{ - system.ApplicationProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>( - transfer_memory_handle)}; + auto transfer_memory{ctx.GetObjectFromHandle<Kernel::KTransferMemory>(transfer_memory_handle)}; LOG_DEBUG(Service_Audio, "sample_rate {} channel_count {} total_stream_count {} stereo_stream_count {} " |