(OSX PPC) Fix Altivec errors

This commit is contained in:
twinaphex 2014-05-22 23:46:41 +02:00
parent 565ccf2ace
commit 890b7f9bcf

View File

@ -95,8 +95,8 @@ void audio_convert_float_to_s16_SSE2(int16_t *out,
void audio_convert_s16_to_float_altivec(float *out, void audio_convert_s16_to_float_altivec(float *out,
const int16_t *in, size_t samples, float gain) const int16_t *in, size_t samples, float gain)
{ {
const vector float gain_vec = vec_splat((vector float)gain, 0); const vector float gain_vec = { gain, gain , gain, gain };
const vector float zero_vec = vec_splat((vector float)0.0f, 0); const vector float zero_vec = { 0.0f, 0.0f, 0.0f, 0.0f};
// Unaligned loads/store is a bit expensive, so we optimize for the good path (very likely). // Unaligned loads/store is a bit expensive, so we optimize for the good path (very likely).
if (((uintptr_t)out & 15) + ((uintptr_t)in & 15) == 0) if (((uintptr_t)out & 15) + ((uintptr_t)in & 15) == 0)
{ {