diff options
| author | 2018-02-13 22:48:31 -0500 | |
|---|---|---|
| committer | 2018-02-13 23:54:12 -0500 | |
| commit | d6e52581acb9b124df57055c12088bb08e530ffc (patch) | |
| tree | 1b48e132d2dbe45fad74cf244774fedb351ff0cc /src/core | |
| parent | vi: Eliminate direct usage of BufferDescriptorB. (diff) | |
| download | yuzu-d6e52581acb9b124df57055c12088bb08e530ffc.tar.gz yuzu-d6e52581acb9b124df57055c12088bb08e530ffc.tar.xz yuzu-d6e52581acb9b124df57055c12088bb08e530ffc.zip | |
audio: Use WriteBuffer instead of BufferDescriptorB.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/service/audio/audout_u.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/service/audio/audren_u.cpp | 4 |
2 files changed, 3 insertions, 9 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: | |||
| 99 | void GetReleasedAudioOutBuffer_1(Kernel::HLERequestContext& ctx) { | 99 | void GetReleasedAudioOutBuffer_1(Kernel::HLERequestContext& ctx) { |
| 100 | LOG_WARNING(Service_Audio, "(STUBBED) called"); | 100 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 101 | 101 | ||
| 102 | const auto& buffer = ctx.BufferDescriptorB()[0]; | ||
| 103 | |||
| 104 | // TODO(st4rk): This is how libtransistor currently implements the | 102 | // TODO(st4rk): This is how libtransistor currently implements the |
| 105 | // GetReleasedAudioOutBuffer, it should return the key (a VAddr) to the app and this address | 103 | // GetReleasedAudioOutBuffer, it should return the key (a VAddr) to the app and this address |
| 106 | // is used to know which buffer should be filled with data and send again to the service | 104 | // is used to know which buffer should be filled with data and send again to the service |
| @@ -112,7 +110,7 @@ private: | |||
| 112 | queue_keys.pop_back(); | 110 | queue_keys.pop_back(); |
| 113 | } | 111 | } |
| 114 | 112 | ||
| 115 | Memory::WriteBlock(buffer.Address(), &key, sizeof(u64)); | 113 | ctx.WriteBuffer(&key, sizeof(u64)); |
| 116 | 114 | ||
| 117 | IPC::ResponseBuilder rb{ctx, 3}; | 115 | IPC::ResponseBuilder rb{ctx, 3}; |
| 118 | rb.Push(RESULT_SUCCESS); | 116 | rb.Push(RESULT_SUCCESS); |
| @@ -158,10 +156,8 @@ void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) { | |||
| 158 | LOG_WARNING(Service_Audio, "(STUBBED) called"); | 156 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 159 | IPC::RequestParser rp{ctx}; | 157 | IPC::RequestParser rp{ctx}; |
| 160 | 158 | ||
| 161 | auto& buffer = ctx.BufferDescriptorB()[0]; | ||
| 162 | const std::string audio_interface = "AudioInterface"; | 159 | const std::string audio_interface = "AudioInterface"; |
| 163 | 160 | ctx.WriteBuffer(audio_interface.c_str(), audio_interface.size()); | |
| 164 | Memory::WriteBlock(buffer.Address(), &audio_interface[0], audio_interface.size()); | ||
| 165 | 161 | ||
| 166 | IPC::ResponseBuilder rb = rp.MakeBuilder(3, 0, 0); | 162 | IPC::ResponseBuilder rb = rp.MakeBuilder(3, 0, 0); |
| 167 | 163 | ||
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index c8d8ba748..20306c6cf 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp | |||
| @@ -69,9 +69,7 @@ private: | |||
| 69 | response_data.state_entries[i].state = 5; | 69 | response_data.state_entries[i].state = 5; |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | auto& buffer = ctx.BufferDescriptorB()[0]; | 72 | ctx.WriteBuffer(&response_data, response_data.total_size); |
| 73 | |||
| 74 | Memory::WriteBlock(buffer.Address(), &response_data, response_data.total_size); | ||
| 75 | 73 | ||
| 76 | IPC::ResponseBuilder rb{ctx, 2}; | 74 | IPC::ResponseBuilder rb{ctx, 2}; |
| 77 | 75 | ||