ERIS CORE

◆ applyGain2()

static void applyGain2 ( int16_t *  data,
int32_t  mult 
)
static

Definition at line 6 of file eris_mixer_ext.cpp.

7 {
8  uint32_t *p = (uint32_t *)data;
9  const uint32_t *end = (uint32_t *)(data + AUDIO_BLOCK_SAMPLES);
10 
11  do {
12  uint32_t tmp32 = *p; // read 2 samples from *data
13  int32_t val1 = signed_multiply_32x16b(mult, tmp32);
14  int32_t val2 = signed_multiply_32x16t(mult, tmp32);
15  val1 = signed_saturate_rshift(val1, 16, 0);
16  val2 = signed_saturate_rshift(val2, 16, 0);
17  *p++ = pack_16b_16b(val2, val1);
18  } while (p < end);
19 }
const char PROGMEM p[][16]
Definition: Eris.h:247

References p.

Referenced by AudioMixer8::update().

+ Here is the caller graph for this function: