diff options
| author | bunnei <bunneidev@gmail.com> | 2018-02-14 18:31:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-14 18:31:53 -0500 |
| commit | db873a232ca92191df89e7e5a13f254f3d58b966 (patch) | |
| tree | 0b0c4a1116f6ef1af1a3144781c149ebd4429577 /src/core/hle/service/audio/audout_u.cpp | |
| parent | 756e9f14848ce19b774de10de9891fd27ec333a7 (diff) | |
| parent | 88bfec37ce445db30fe36bb2d00b115df6a24838 (diff) | |
Merge pull request #188 from bunnei/refactor-buffer-descriptor
Refactor IPC buffer descriptor interface
Diffstat (limited to 'src/core/hle/service/audio/audout_u.cpp')
| -rw-r--r-- | src/core/hle/service/audio/audout_u.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index f56ba2ea1..780a4e6e5 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp @@ -99,8 +99,6 @@ private: void GetReleasedAudioOutBuffer_1(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service_Audio, "(STUBBED) called"); - const auto& buffer = ctx.BufferDescriptorB()[0]; - // TODO(st4rk): This is how libtransistor currently implements the // GetReleasedAudioOutBuffer, it should return the key (a VAddr) to the app and this address // is used to know which buffer should be filled with data and send again to the service @@ -112,7 +110,7 @@ private: queue_keys.pop_back(); } - Memory::WriteBlock(buffer.Address(), &key, sizeof(u64)); + ctx.WriteBuffer(&key, sizeof(u64)); IPC::ResponseBuilder rb{ctx, 3}; rb.Push(RESULT_SUCCESS); @@ -158,10 +156,8 @@ void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service_Audio, "(STUBBED) called"); IPC::RequestParser rp{ctx}; - auto& buffer = ctx.BufferDescriptorB()[0]; const std::string audio_interface = "AudioInterface"; - - Memory::WriteBlock(buffer.Address(), &audio_interface[0], audio_interface.size()); + ctx.WriteBuffer(audio_interface.c_str(), audio_interface.size()); IPC::ResponseBuilder rb = rp.MakeBuilder(3, 0, 0); |
