You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OpenAudio_ArduinoLibrary/AudioMathMultiply_F32.cpp

21 lines
475 B

#include "AudioMathMultiply_F32.h"
void AudioMathMultiply_F32::update(void) {
audio_block_f32_t *block, *in;
block = AudioStream_F32::receiveWritable_f32(0);
if (!block) return;
in = AudioStream_F32::receiveReadOnly_f32(1);
if (!in) {
AudioStream_F32::release(block);
return;
}
arm_mult_f32(block->data, in->data, block->data, block->length);
AudioStream_F32::release(in);
AudioStream_F32::transmit(block);
AudioStream_F32::release(block);
}