diff options
author | bunnei <bunneidev@gmail.com> | 2022-11-25 09:38:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-25 09:38:17 +0100 |
commit | 64965cc658a6266ddb9878ffd53bd69e0a0f5b79 (patch) | |
tree | 495b63ec25d2b5e8d5888004e5bca0dcdf67704b /src/core/hle/service/audio/audout_u.cpp | |
parent | Merge pull request #9194 from FernandoS27/yfc-fermi2d (diff) | |
parent | service: Make use of buffer element count helpers (diff) | |
download | yuzu-64965cc658a6266ddb9878ffd53bd69e0a0f5b79.tar yuzu-64965cc658a6266ddb9878ffd53bd69e0a0f5b79.tar.gz yuzu-64965cc658a6266ddb9878ffd53bd69e0a0f5b79.tar.bz2 yuzu-64965cc658a6266ddb9878ffd53bd69e0a0f5b79.tar.lz yuzu-64965cc658a6266ddb9878ffd53bd69e0a0f5b79.tar.xz yuzu-64965cc658a6266ddb9878ffd53bd69e0a0f5b79.tar.zst yuzu-64965cc658a6266ddb9878ffd53bd69e0a0f5b79.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/audio/audout_u.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 122290c6a..29751f075 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp @@ -129,16 +129,16 @@ private: } void GetReleasedAudioOutBuffers(Kernel::HLERequestContext& ctx) { - auto write_buffer_size = ctx.GetWriteBufferSize() / sizeof(u64); - std::vector<u64> released_buffers(write_buffer_size, 0); + const auto write_buffer_size = ctx.GetWriteBufferNumElements<u64>(); + std::vector<u64> released_buffers(write_buffer_size); - auto count = impl->GetReleasedBuffers(released_buffers); + const auto count = impl->GetReleasedBuffers(released_buffers); [[maybe_unused]] std::string tags{}; for (u32 i = 0; i < count; i++) { tags += fmt::format("{:08X}, ", released_buffers[i]); } - [[maybe_unused]] auto sessionid{impl->GetSystem().GetSessionId()}; + [[maybe_unused]] const auto sessionid{impl->GetSystem().GetSessionId()}; LOG_TRACE(Service_Audio, "called. Session {} released {} buffers: {}", sessionid, count, tags); @@ -244,7 +244,7 @@ void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) { std::scoped_lock l{impl->mutex}; const auto write_count = - static_cast<u32>(ctx.GetWriteBufferSize() / sizeof(AudioDevice::AudioDeviceName)); + static_cast<u32>(ctx.GetWriteBufferNumElements<AudioDevice::AudioDeviceName>()); std::vector<AudioDevice::AudioDeviceName> device_names{}; if (write_count > 0) { device_names.emplace_back("DeviceOut"); |