From 1dee8ceda1e5ecd5ebaee464b1450f323e82305f Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 4 Aug 2018 00:03:12 -0400 Subject: audio_core: Use s16 where possible for audio samples. --- src/core/hle/service/audio/audout_u.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index f4a557634..108a7c6eb 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp @@ -113,10 +113,10 @@ private: std::memcpy(&audio_buffer, input_buffer.data(), sizeof(AudioBuffer)); const u64 tag{rp.Pop()}; - std::vector data(audio_buffer.buffer_size); - Memory::ReadBlock(audio_buffer.buffer, data.data(), data.size()); + std::vector samples(audio_buffer.buffer_size / sizeof(s16)); + Memory::ReadBlock(audio_buffer.buffer, samples.data(), audio_buffer.buffer_size); - if (!audio_core.QueueBuffer(stream, tag, std::move(data))) { + if (!audio_core.QueueBuffer(stream, tag, std::move(samples))) { IPC::ResponseBuilder rb{ctx, 2}; rb.Push(ResultCode(ErrorModule::Audio, ErrCodes::BufferCountExceeded)); } -- cgit v1.2.3