Fix add unsigned to signed 16bits integers

This commit is contained in:
Jérémy Lugand 2024-01-07 21:44:30 +01:00
parent 252c28d3e6
commit 62495f4ebe
No known key found for this signature in database
GPG Key ID: E60AF078DEB97B35

View File

@ -1,6 +1,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include "mixer.h"
@ -362,8 +363,8 @@ void aEnvMixerImpl(uint16_t in_addr, uint16_t n_samples, bool swap_reverb,
// Store values to buffers
for (int j = 0; j < 2; j++) {
_mm_store_si128(d_ptr[j]++, _mm_add_epi16(s[j], d[j]));
_mm_store_si128(w_ptr[j]++, _mm_add_epi16(ss[j], w[j]));
_mm_store_si128(d_ptr[j]++, _mm_adds_epi16(s[j], d[j]));
_mm_store_si128(w_ptr[j]++, _mm_adds_epi16(ss[j], w[j]));
vols[j] += rates[j];
}
vol_wet += rate_wet;