Fixed bug 4186 - ARM/NEON audio converters cause strange clicking noises
authorSylvain Becker <sylvain.becker@gmail.com>
Mon, 19 Aug 2019 20:35:02 +0200
changeset 1302633b64882e322
parent 13025 644eeed7ce2f
child 13027 69cc269eec53
Fixed bug 4186 - ARM/NEON audio converters cause strange clicking noises
reverse the order when storing ouput buffer
src/audio/SDL_audiotypecvt.c
     1.1 --- a/src/audio/SDL_audiotypecvt.c	Mon Aug 19 16:57:15 2019 +0200
     1.2 +++ b/src/audio/SDL_audiotypecvt.c	Mon Aug 19 20:35:02 2019 +0200
     1.3 @@ -879,10 +879,10 @@
     1.4              const int16x8_t int16hi = vmovl_s8(vget_high_s8(bytes));  /* convert top 8 bytes to 8 int16 */
     1.5              const int16x8_t int16lo = vmovl_s8(vget_low_s8(bytes));   /* convert bottom 8 bytes to 8 int16 */
     1.6              /* split int16 to two int32, then convert to float, then multiply to normalize, store. */
     1.7 -            vst1q_f32(dst, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16hi))), divby128));
     1.8 -            vst1q_f32(dst+4, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(int16hi))), divby128));
     1.9 -            vst1q_f32(dst+8, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16lo))), divby128));
    1.10 -            vst1q_f32(dst+12, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(int16lo))), divby128));
    1.11 +            vst1q_f32(dst, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(int16lo))), divby128));
    1.12 +            vst1q_f32(dst+4, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16lo))), divby128));
    1.13 +            vst1q_f32(dst+8, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(int16hi))), divby128));
    1.14 +            vst1q_f32(dst+12, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16hi))), divby128));
    1.15              i -= 16; mmsrc -= 16; dst -= 16;
    1.16          }
    1.17