Initial commit.
This commit is contained in:
commit
1d8f869b5b
39 changed files with 1671 additions and 0 deletions
1
src/dsp/README.md
Normal file
1
src/dsp/README.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Small, independently testable DSP primitives implemented in C.
|
||||
15
src/dsp/gain.c
Normal file
15
src/dsp/gain.c
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#include <stddef.h>
|
||||
|
||||
/* Kept as a separately testable DSP primitive. */
|
||||
void xt_dsp_gain_process(const float *input, float *output,
|
||||
size_t frame_count, float gain)
|
||||
{
|
||||
size_t frame;
|
||||
|
||||
if (input == NULL || output == NULL) {
|
||||
return;
|
||||
}
|
||||
for (frame = 0U; frame < frame_count; frame++) {
|
||||
output[frame] = input[frame] * gain;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue