fix channel swap in S16_LE case on LE architectures
Adrian Smith
10 years ago
938 | 938 | #if SL_LITTLE_ENDIAN |
939 | 939 | if (gainL == FIXED_ONE && gainR == FIXED_ONE) { |
940 | 940 | while (cnt--) { |
941 | *(optr++) = (*(inputptr) & 0xffff0000) | (*(inputptr+1) >> 16 & 0x0000ffff); | |
941 | *(optr++) = (*(inputptr) >> 16 & 0x0000ffff) | (*(inputptr + 1) & 0xffff0000); | |
942 | 942 | inputptr += 2; |
943 | 943 | } |
944 | 944 | } else { |
945 | 945 | while (cnt--) { |
946 | *(optr++) = (gain(gainL, *(inputptr)) & 0xffff0000) | (gain(gainR, *(inputptr+1)) >> 16 & 0x0000ffff); | |
946 | *(optr++) = (gain(gainL, *(inputptr)) >> 16 & 0x0000ffff) | (gain(gainR, *(inputptr+1)) & 0xffff0000); | |
947 | 947 | inputptr += 2; |
948 | 948 | } |
949 | 949 | } |