diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2026-09-16 09:01:55 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-16 09:01:55 -0600 |
| commit | 60ac50c9628d25968bfe367e1b4b6f030078be64 (patch) | |
| tree | e03a0d825cfe443adcf076cb643c20692151f431 /src/audio/mixer.c | |
| parent | 7adfdaa9abb18d76ae80f26bff58c2c4dc4f3f29 (diff) | |
| parent | 8fb42e50d70356300050048b57def3123e6d4552 (diff) | |
Merge branch 'main' into Caladius-patch-1Caladius-patch-1
Diffstat (limited to 'src/audio/mixer.c')
| -rw-r--r-- | src/audio/mixer.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/audio/mixer.c b/src/audio/mixer.c index 9b8157ab5..729dc2949 100644 --- a/src/audio/mixer.c +++ b/src/audio/mixer.c @@ -7,6 +7,12 @@ #include "mixer.h" +// The Impl signatures mirror the RSP command layout, so unused parameters are expected here; +// suppress the warning once for the file instead of tagging every signature. +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + #ifndef __clang__ #pragma GCC optimize("unroll-loops") #endif @@ -133,15 +139,6 @@ static inline int16_t clamp16(int32_t v) { return (int16_t) v; } -static inline int32_t clamp32(int64_t v) { - if (v < -0x7fffffff - 1) { - return -0x7fffffff - 1; - } else if (v > 0x7fffffff) { - return 0x7fffffff; - } - return (int32_t) v; -} - void aClearBufferImpl(uint16_t addr, int nbytes) { nbytes = ROUND_UP_16(nbytes); memset(BUF_U8(addr), 0, nbytes); @@ -296,8 +293,7 @@ void aADPCMdecImpl(uint8_t flags, ADPCM_STATE state) { __m128i mask = _mm_loadl_epi64((__m128i*) lower_bit); while (nbytes > 0) { - int shift = *in >> 4; // should be in 0..12 or 0..14 - __m128i shift_vec = _mm_set1_epi16(shift); + int shift = *in >> 4; // should be in 0..12 or 0..14 int table_index = *in++ & 0xf; // should be in 0..7 int16_t(*tbl)[8] = rspa.adpcm_table[table_index]; @@ -734,7 +730,6 @@ void aMixImpl(int16_t gain, uint16_t in_addr, uint16_t out_addr, uint16_t count) int16_t* in = BUF_S16(in_addr); int16_t* out = BUF_S16(out_addr); int i; - int32_t sample; if (gain == -0x8000) { while (nbytes > 0) { |
