Update audioMixer for block length

feature_setBlockSize
Chip Audette 8 years ago
parent 9c2dc661f2
commit acbd88ca29
  1. 6
      AudioMixer4_F32.cpp

@ -6,7 +6,7 @@ void AudioMixer4_F32::update(void) {
out = receiveWritable_f32(0);
if (!out) return;
arm_scale_f32(out->data, multiplier[0], out->data, AUDIO_BLOCK_SAMPLES);
arm_scale_f32(out->data, multiplier[0], out->data, out->length);
for (int channel=1; channel < 4; channel++) {
in = receiveReadOnly_f32(channel);
@ -16,8 +16,8 @@ void AudioMixer4_F32::update(void) {
audio_block_f32_t *tmp = allocate_f32();
arm_scale_f32(in->data, multiplier[channel], tmp->data, AUDIO_BLOCK_SAMPLES);
arm_add_f32(out->data, tmp->data, out->data, AUDIO_BLOCK_SAMPLES);
arm_scale_f32(in->data, multiplier[channel], tmp->data, tmp->length);
arm_add_f32(out->data, tmp->data, out->data, tmp->length);
release(tmp);
release(in);

Loading…
Cancel
Save