Skip to content

Commit

Permalink
Merge pull request #50 from AliceLR/fix-x86-convert32to24
Browse files Browse the repository at this point in the history
Fix broken bitshifts in GCC version of X86_Convert32To24
  • Loading branch information
Konstanty committed Jan 28, 2022
2 parents 1fdbffd + 912a287 commit b554a6a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/fastmix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1887,13 +1887,13 @@ DWORD MPPASMCALL X86_Convert32To24(LPVOID lp16, int *pBuffer, DWORD lSampleCount
vumax = n;
p = n >> (8-MIXING_ATTENUATION) ; // 24-bit signed
#ifdef WORDS_BIGENDIAN
buf[i*3+0] = p & 0xFF0000 >> 24;
buf[i*3+1] = p & 0x00FF00 >> 16 ;
buf[i*3+2] = p & 0x0000FF ;
buf[i*3+0] = (p >> 16) & 0xFF;
buf[i*3+1] = (p >> 8) & 0xFF;
buf[i*3+2] = (p >> 0) & 0xFF;
#else
buf[i*3+0] = p & 0x0000FF ;
buf[i*3+1] = p & 0x00FF00 >> 16;
buf[i*3+2] = p & 0xFF0000 >> 24;
buf[i*3+0] = (p >> 0) & 0xFF;
buf[i*3+1] = (p >> 8) & 0xFF;
buf[i*3+2] = (p >> 16) & 0xFF;
#endif
}
*lpMin = vumin;
Expand Down

0 comments on commit b554a6a

Please sign in to comment.