Fix PSP audio conversion code

Fixes https://github.com/libretro/QuickNES_Core/issues/72
This commit is contained in:
bmaupin 2019-09-06 21:02:37 -04:00
parent b875a69266
commit 3047c55121
1 changed files with 5 additions and 3 deletions

View File

@ -113,7 +113,11 @@ void convert_s16_to_float(float *out,
i = 0;
}
#elif defined(_MIPS_ARCH_ALLEGREX)
#endif
gain = gain / 0x8000;
#if defined(_MIPS_ARCH_ALLEGREX)
#ifdef DEBUG
/* Make sure the buffer is 16 byte aligned, this should be the
* default behaviour of malloc in the PSPSDK.
@ -121,7 +125,6 @@ void convert_s16_to_float(float *out,
retro_assert(((uintptr_t)out & 0xf) == 0);
#endif
gain = gain / 0x8000;
__asm__ (
".set push \n"
".set noreorder \n"
@ -166,7 +169,6 @@ void convert_s16_to_float(float *out,
}
#endif
gain = gain / 0x8000;
for (; i < samples; i++)
out[i] = (float)in[i] * gain;