diff options
| author | 2020-10-20 19:07:39 -0700 | |
|---|---|---|
| committer | 2020-10-20 19:07:39 -0700 | |
| commit | 3d592972dc3fd61cc88771b889eff237e4e03e0f (patch) | |
| tree | 0dbc65ac86e609ae22087c7be9d4759ac6b73004 /src/audio_core/codec.cpp | |
| parent | kernel: Fix build with recent compiler flag changes (diff) | |
| download | yuzu-3d592972dc3fd61cc88771b889eff237e4e03e0f.tar.gz yuzu-3d592972dc3fd61cc88771b889eff237e4e03e0f.tar.xz yuzu-3d592972dc3fd61cc88771b889eff237e4e03e0f.zip | |
Revert "core: Fix clang build"
Diffstat (limited to 'src/audio_core/codec.cpp')
| -rw-r--r-- | src/audio_core/codec.cpp | 6 |
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 | ||