mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 00:49:47 +00:00
Fix segfault when samples < 8 on NEON.
This commit is contained in:
parent
3d9bacd536
commit
e3a0668f55
@ -141,7 +141,8 @@ void audio_convert_s16_to_float_neon(float *out, const int16_t *in, size_t sampl
|
||||
(void)gain; // gain is ignored for now.
|
||||
|
||||
size_t aligned_samples = samples & ~7;
|
||||
audio_convert_s16_float_asm(out, in, aligned_samples);
|
||||
if (aligned_samples)
|
||||
audio_convert_s16_float_asm(out, in, aligned_samples);
|
||||
|
||||
// Could do all conversion in ASM, but keep it simple for now.
|
||||
audio_convert_s16_to_float_C(out + aligned_samples, in + aligned_samples,
|
||||
@ -152,7 +153,9 @@ void audio_convert_float_s16_asm(int16_t *out, const float *in, size_t samples);
|
||||
void audio_convert_float_to_s16_neon(int16_t *out, const float *in, size_t samples)
|
||||
{
|
||||
size_t aligned_samples = samples & ~7;
|
||||
audio_convert_float_s16_asm(out, in, aligned_samples);
|
||||
if (aligned_samples)
|
||||
audio_convert_float_s16_asm(out, in, aligned_samples);
|
||||
|
||||
audio_convert_float_to_s16_C(out + aligned_samples, in + aligned_samples,
|
||||
samples - aligned_samples);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user