diff --git a/audio/utils.c b/audio/utils.c index 1061fe3099..f26cfc6dd2 100644 --- a/audio/utils.c +++ b/audio/utils.c @@ -26,7 +26,11 @@ void audio_convert_s16_to_float_C(float *out, { gain = gain / 0x8000; for (size_t i = 0; i < samples; i++) +#ifdef __CELLOS_LV2__ + out[i] = (float)in[i] / 0x8000; +#else out[i] = (float)in[i] * gain; +#endif } void audio_convert_float_to_s16_C(int16_t *out, @@ -98,8 +102,14 @@ void audio_convert_s16_to_float_altivec(float *out, vector signed short input = vec_ld(0, in); vector signed int hi = vec_unpackh(input); vector signed int lo = vec_unpackl(input); +#ifdef __CELLOS_LV2__ + /* vec_mul not supported */ + vector float out_hi = vec_ctf(hi, 15); + vector float out_lo = vec_ctf(lo, 15); +#else vector float out_hi = vec_mul(vec_ctf(hi, 15), gain_vec); vector float out_lo = vec_mul(vec_ctf(lo, 15), gain_vec); +#endif vec_st(out_hi, 0, out); vec_st(out_lo, 16, out); diff --git a/console/griffin/griffin.c b/console/griffin/griffin.c index ca0ffb7677..2cd18e219a 100644 --- a/console/griffin/griffin.c +++ b/console/griffin/griffin.c @@ -229,11 +229,9 @@ RSOUND /*============================================================ AUDIO UTILS ============================================================ */ -#ifndef __CELLOS_LV2__ /* PS3 right now doesn't compile with the Altivec intrinsics * used here */ #include "../../audio/utils.c" -#endif /*============================================================ AUDIO @@ -331,8 +329,10 @@ THREAD ============================================================ */ #ifdef HAVE_THREAD #include "../../thread.c" +#ifdef ANDROID #include "../../autosave.c" #endif +#endif /*============================================================ NETPLAY