summaryrefslogtreecommitdiff
path: root/src/audio_core/codec.cpp
diff options
context:
space:
mode:
authorGravatar LC2020-10-20 22:08:53 -0400
committerGravatar GitHub2020-10-20 22:08:53 -0400
commit2e74b79e89fe1e6a21fe0d8650844e563b3c32f5 (patch)
tree0dbc65ac86e609ae22087c7be9d4759ac6b73004 /src/audio_core/codec.cpp
parentkernel: Fix build with recent compiler flag changes (diff)
parentRevert "core: Fix clang build" (diff)
downloadyuzu-2e74b79e89fe1e6a21fe0d8650844e563b3c32f5.tar.gz
yuzu-2e74b79e89fe1e6a21fe0d8650844e563b3c32f5.tar.xz
yuzu-2e74b79e89fe1e6a21fe0d8650844e563b3c32f5.zip
Merge pull request #4814 from yuzu-emu/revert-4796-clang
Revert "core: Fix clang build"
Diffstat (limited to 'src/audio_core/codec.cpp')
-rw-r--r--src/audio_core/codec.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/audio_core/codec.cpp b/src/audio_core/codec.cpp
index d89f94ea2..2fb91c13a 100644
--- a/src/audio_core/codec.cpp
+++ b/src/audio_core/codec.cpp
@@ -32,7 +32,7 @@ std::vector<s16> DecodeADPCM(const u8* const data, std::size_t size, const ADPCM
32 for (std::size_t framei = 0; framei < NUM_FRAMES; framei++) { 32 for (std::size_t framei = 0; framei < NUM_FRAMES; framei++) {
33 const int frame_header = data[framei * FRAME_LEN]; 33 const int frame_header = data[framei * FRAME_LEN];
34 const int scale = 1 << (frame_header & 0xF); 34 const int scale = 1 << (frame_header & 0xF);
35 const auto idx = static_cast<size_t>((frame_header >> 4) & 0x7); 35 const int idx = (frame_header >> 4) & 0x7;
36 36
37 // Coefficients are fixed point with 11 bits fractional part. 37 // Coefficients are fixed point with 11 bits fractional part.
38 const int coef1 = coeff[idx * 2 + 0]; 38 const int coef1 = coeff[idx * 2 + 0];
@@ -57,11 +57,11 @@ std::vector<s16> DecodeADPCM(const u8* const data, std::size_t size, const ADPCM
57 std::size_t outputi = framei * SAMPLES_PER_FRAME; 57 std::size_t outputi = framei * SAMPLES_PER_FRAME;
58 std::size_t datai = framei * FRAME_LEN + 1; 58 std::size_t datai = framei * FRAME_LEN + 1;
59 for (std::size_t i = 0; i < SAMPLES_PER_FRAME && outputi < sample_count; i += 2) { 59 for (std::size_t i = 0; i < SAMPLES_PER_FRAME && outputi < sample_count; i += 2) {
60 const s16 sample1 = decode_sample(SIGNED_NIBBLES[static_cast<u32>(data[datai] >> 4)]); 60 const s16 sample1 = decode_sample(SIGNED_NIBBLES[data[datai] >> 4]);
61 ret[outputi] = sample1; 61 ret[outputi] = sample1;
62 outputi++; 62 outputi++;
63 63
64 const s16 sample2 = decode_sample(SIGNED_NIBBLES[static_cast<u32>(data[datai] & 0xF)]); 64 const s16 sample2 = decode_sample(SIGNED_NIBBLES[data[datai] & 0xF]);
65 ret[outputi] = sample2; 65 ret[outputi] = sample2;
66 outputi++; 66 outputi++;
67 67