diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2022-12-25 20:31:53 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2022-12-29 00:46:54 +0100 |
commit | a1490d77ace26ec01a60541239d9a8524b88fcec (patch) | |
tree | 8da577293325c3f585a4d031288339885ca26a65 /src/core/hle/service/audio | |
parent | hle_ipc: Rename ReadBuffer to ReadBufferCopy (diff) | |
download | yuzu-a1490d77ace26ec01a60541239d9a8524b88fcec.tar yuzu-a1490d77ace26ec01a60541239d9a8524b88fcec.tar.gz yuzu-a1490d77ace26ec01a60541239d9a8524b88fcec.tar.bz2 yuzu-a1490d77ace26ec01a60541239d9a8524b88fcec.tar.lz yuzu-a1490d77ace26ec01a60541239d9a8524b88fcec.tar.xz yuzu-a1490d77ace26ec01a60541239d9a8524b88fcec.tar.zst yuzu-a1490d77ace26ec01a60541239d9a8524b88fcec.zip |
Diffstat (limited to 'src/core/hle/service/audio')
-rw-r--r-- | src/core/hle/service/audio/audin_u.cpp | 6 | ||||
-rw-r--r-- | src/core/hle/service/audio/audout_u.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/audio/audren_u.cpp | 6 | ||||
-rw-r--r-- | src/core/hle/service/audio/hwopus.cpp | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/core/hle/service/audio/audin_u.cpp b/src/core/hle/service/audio/audin_u.cpp index f3dd8397d..053e8f9dd 100644 --- a/src/core/hle/service/audio/audin_u.cpp +++ b/src/core/hle/service/audio/audin_u.cpp @@ -98,7 +98,7 @@ private: LOG_ERROR(Service_Audio, "Input buffer is too small for an AudioInBuffer!"); } - const auto& in_buffer = ctx.ReadBufferSpan(); + const auto& in_buffer = ctx.ReadBuffer(); AudioInBuffer buffer{}; std::memcpy(&buffer, in_buffer.data(), sizeof(AudioInBuffer)); @@ -266,7 +266,7 @@ void AudInU::OpenAudioIn(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; auto in_params{rp.PopRaw<AudioInParameter>()}; auto applet_resource_user_id{rp.PopRaw<u64>()}; - const auto device_name_data{ctx.ReadBufferSpan()}; + const auto device_name_data{ctx.ReadBuffer()}; auto device_name = Common::StringFromBuffer(device_name_data); auto handle{ctx.GetCopyHandle(0)}; @@ -317,7 +317,7 @@ void AudInU::OpenAudioInProtocolSpecified(Kernel::HLERequestContext& ctx) { auto protocol_specified{rp.PopRaw<u64>()}; auto in_params{rp.PopRaw<AudioInParameter>()}; auto applet_resource_user_id{rp.PopRaw<u64>()}; - const auto device_name_data{ctx.ReadBufferSpan()}; + const auto device_name_data{ctx.ReadBuffer()}; auto device_name = Common::StringFromBuffer(device_name_data); auto handle{ctx.GetCopyHandle(0)}; diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 4bf388055..29751f075 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp @@ -105,7 +105,7 @@ private: LOG_ERROR(Service_Audio, "Input buffer is too small for an AudioOutBuffer!"); } - const auto& in_buffer = ctx.ReadBufferSpan(); + const auto& in_buffer = ctx.ReadBuffer(); AudioOutBuffer buffer{}; std::memcpy(&buffer, in_buffer.data(), sizeof(AudioOutBuffer)); @@ -264,7 +264,7 @@ void AudOutU::OpenAudioOut(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; auto in_params{rp.PopRaw<AudioOutParameter>()}; auto applet_resource_user_id{rp.PopRaw<u64>()}; - const auto device_name_data{ctx.ReadBufferSpan()}; + const auto device_name_data{ctx.ReadBuffer()}; auto device_name = Common::StringFromBuffer(device_name_data); auto handle{ctx.GetCopyHandle(0)}; diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index 1a48c155e..0ee28752c 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp @@ -112,7 +112,7 @@ private: void RequestUpdate(Kernel::HLERequestContext& ctx) { LOG_TRACE(Service_Audio, "called"); - const auto input{ctx.ReadBufferSpan(0)}; + const auto input{ctx.ReadBuffer(0)}; // These buffers are written manually to avoid an issue with WriteBuffer throwing errors for // checking size 0. Performance size is 0 for most games. @@ -306,7 +306,7 @@ private: IPC::RequestParser rp{ctx}; const f32 volume = rp.Pop<f32>(); - const auto device_name_buffer = ctx.ReadBufferSpan(); + const auto device_name_buffer = ctx.ReadBuffer(); const std::string name = Common::StringFromBuffer(device_name_buffer); LOG_DEBUG(Service_Audio, "called. name={}, volume={}", name, volume); @@ -320,7 +320,7 @@ private: } void GetAudioDeviceOutputVolume(Kernel::HLERequestContext& ctx) { - const auto device_name_buffer = ctx.ReadBufferSpan(); + const auto device_name_buffer = ctx.ReadBuffer(); const std::string name = Common::StringFromBuffer(device_name_buffer); LOG_DEBUG(Service_Audio, "called. Name={}", name); diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index 7c3f25c67..e01f87356 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp @@ -74,7 +74,7 @@ private: ResetDecoderContext(); } - if (!DecodeOpusData(consumed, sample_count, ctx.ReadBufferSpan(), samples, performance)) { + if (!DecodeOpusData(consumed, sample_count, ctx.ReadBuffer(), samples, performance)) { LOG_ERROR(Audio, "Failed to decode opus data"); IPC::ResponseBuilder rb{ctx, 2}; // TODO(ogniK): Use correct error code @@ -257,7 +257,7 @@ void HwOpus::GetWorkBufferSizeEx(Kernel::HLERequestContext& ctx) { void HwOpus::GetWorkBufferSizeForMultiStreamEx(Kernel::HLERequestContext& ctx) { OpusMultiStreamParametersEx param; - std::memcpy(¶m, ctx.ReadBufferSpan().data(), ctx.GetReadBufferSize()); + std::memcpy(¶m, ctx.ReadBuffer().data(), ctx.GetReadBufferSize()); const auto sample_rate = param.sample_rate; const auto channel_count = param.channel_count; |