mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 16:54:03 +02:00
apply MA_RESTRICT to linear resampler interpolation functions
This tells the compiler that pFrameOut does not alias to pointers used within the function, and teaches Clang that the loop is vectorizable. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
This commit is contained in:
+2
-2
@@ -38384,7 +38384,7 @@ static MA_INLINE ma_int16 ma_linear_resampler_mix_s16(ma_int16 x, ma_int16 y, ma
|
|||||||
return (ma_int16)(r >> shift);
|
return (ma_int16)(r >> shift);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ma_linear_resampler_interpolate_frame_s16(ma_linear_resampler* pResampler, ma_int16* pFrameOut)
|
static void ma_linear_resampler_interpolate_frame_s16(ma_linear_resampler* pResampler, ma_int16* MA_RESTRICT pFrameOut)
|
||||||
{
|
{
|
||||||
ma_uint32 c;
|
ma_uint32 c;
|
||||||
ma_uint32 a;
|
ma_uint32 a;
|
||||||
@@ -38403,7 +38403,7 @@ static void ma_linear_resampler_interpolate_frame_s16(ma_linear_resampler* pResa
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void ma_linear_resampler_interpolate_frame_f32(ma_linear_resampler* pResampler, float* pFrameOut)
|
static void ma_linear_resampler_interpolate_frame_f32(ma_linear_resampler* pResampler, float* MA_RESTRICT pFrameOut)
|
||||||
{
|
{
|
||||||
ma_uint32 c;
|
ma_uint32 c;
|
||||||
float a;
|
float a;
|
||||||
|
|||||||
Reference in New Issue
Block a user