Does need 4 bytes alignmen in SDL_Upsample_S16LSB_2c? |
Does need 4 bytes alignmen in SDL_Upsample_S16LSB_2c? |
Patrick Baggett
Guest
|
In the future, please post the file pathÂ
On Tue, Feb 21, 2012 at 3:54 AM, li zhuo wrote:
I think I know what you're trying to say, but your getting your terms a bit confused here. A compiler won't generate an integer value that isn't aligned to its natural boundaries, no. This array is indexing 16-bit values, which means it will only fault if the address is not 2-byte aligned. I guess it depends on the result of the multiplication. It would seem that it would be safer to ensure that it starts on the nearest sample, but ANDing the address isn't the right way, because you don't want to just ensure it doesn't fault, but you want to ensure that if you do have to round down, you pick the beginning of a sample, not the middle, which would reverse the L/R channels in this case. The fact that this hasn't been hit yet makes me think that there might be something special about the way these values are picked. Then again, it might be a legitimate bug. Anyone more familiar with how this part of the code have any insights? Â
|
|||||||||||||||
|