mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-04 02:26:13 +00:00
(PS3) Hack around vec_mul not being supported for PS3 VMX/Altivec
for now
This commit is contained in:
parent
fcf75398ea
commit
876bf69a80
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user