diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-12-26 17:46:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-26 17:46:11 +0100 |
commit | de1e5584b32edcc5b43dd7b5757ee4b361f9f70c (patch) | |
tree | a11721530b76fa281f0793ed8469fd9a847f5489 /src/core/hle/service/audio | |
parent | Merge pull request #12471 from FearlessTobi/port-7146 (diff) | |
parent | am/jit: reference memory instance from context (diff) | |
download | yuzu-de1e5584b32edcc5b43dd7b5757ee4b361f9f70c.tar yuzu-de1e5584b32edcc5b43dd7b5757ee4b361f9f70c.tar.gz yuzu-de1e5584b32edcc5b43dd7b5757ee4b361f9f70c.tar.bz2 yuzu-de1e5584b32edcc5b43dd7b5757ee4b361f9f70c.tar.lz yuzu-de1e5584b32edcc5b43dd7b5757ee4b361f9f70c.tar.xz yuzu-de1e5584b32edcc5b43dd7b5757ee4b361f9f70c.tar.zst yuzu-de1e5584b32edcc5b43dd7b5757ee4b361f9f70c.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 {} " |