summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-08-04 06:03:12 +0200
committerbunnei <bunneidev@gmail.com>2018-08-05 00:22:58 +0200
commit1dee8ceda1e5ecd5ebaee464b1450f323e82305f (patch)
tree97275d9a1c055d067053831f50a09ab9628ebf8e /src/core/hle/service
parentaudio_core: Port codec code from Citra for ADPCM decoding. (diff)
downloadyuzu-1dee8ceda1e5ecd5ebaee464b1450f323e82305f.tar
yuzu-1dee8ceda1e5ecd5ebaee464b1450f323e82305f.tar.gz
yuzu-1dee8ceda1e5ecd5ebaee464b1450f323e82305f.tar.bz2
yuzu-1dee8ceda1e5ecd5ebaee464b1450f323e82305f.tar.lz
yuzu-1dee8ceda1e5ecd5ebaee464b1450f323e82305f.tar.xz
yuzu-1dee8ceda1e5ecd5ebaee464b1450f323e82305f.tar.zst
yuzu-1dee8ceda1e5ecd5ebaee464b1450f323e82305f.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/audio/audout_u.cpp6
1 files changed, 3 insertions, 3 deletions
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<u64>()};
- std::vector<u8> data(audio_buffer.buffer_size);
- Memory::ReadBlock(audio_buffer.buffer, data.data(), data.size());
+ std::vector<s16> 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));
}