diff options
author | Subv <subv2112@gmail.com> | 2017-09-25 20:06:42 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2017-09-26 01:31:37 +0200 |
commit | d7459354f58d1b71fc0c5ec48de9242e6a2fd00c (patch) | |
tree | 20aa98adee17b0a2886273806a62f333d1198ab4 /src/audio_core/codec.cpp | |
parent | Merge pull request #2952 from MerryMage/page-tables (diff) | |
download | yuzu-d7459354f58d1b71fc0c5ec48de9242e6a2fd00c.tar yuzu-d7459354f58d1b71fc0c5ec48de9242e6a2fd00c.tar.gz yuzu-d7459354f58d1b71fc0c5ec48de9242e6a2fd00c.tar.bz2 yuzu-d7459354f58d1b71fc0c5ec48de9242e6a2fd00c.tar.lz yuzu-d7459354f58d1b71fc0c5ec48de9242e6a2fd00c.tar.xz yuzu-d7459354f58d1b71fc0c5ec48de9242e6a2fd00c.tar.zst yuzu-d7459354f58d1b71fc0c5ec48de9242e6a2fd00c.zip |
Diffstat (limited to 'src/audio_core/codec.cpp')
-rw-r--r-- | src/audio_core/codec.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/audio_core/codec.cpp b/src/audio_core/codec.cpp index 7a3bd7eb3..6fba9fdae 100644 --- a/src/audio_core/codec.cpp +++ b/src/audio_core/codec.cpp @@ -117,7 +117,9 @@ StereoBuffer16 DecodePCM16(const unsigned num_channels, const u8* const data, ret[i].fill(sample); } } else { - std::memcpy(ret.data(), data, sample_count * 2 * sizeof(u16)); + for (size_t i = 0; i < sample_count; ++i) { + std::memcpy(&ret[i], data + i * sizeof(s16) * 2, 2 * sizeof(s16)); + } } return ret; |