|
Zrythm
a highly automated and intuitive digital audio workstation
|
Optimized DSP functions. More...
#include "zrythm-config.h"#include <cstddef>#include "utils/math.h"#include "zrythm.h"#include <glib.h>
Go to the source code of this file.
Functions | |
| NONNULL float | dsp_min (float *buf, size_t size) |
| Gets the minimum of the buffer. | |
| NONNULL float | dsp_max (float *buf, size_t size) |
| Gets the maximum of the buffer. | |
| NONNULL void | dsp_mix_add2 (float *dest, const float *src1, const float *src2, float k1, float k2, size_t size) |
| Calculate dst[i] = dst[i] + src1[i] * k1 + src2[i] * k2. | |
| NONNULL void | dsp_linear_fade_in_from (float *dest, int32_t start_offset, int32_t total_frames_to_fade, size_t size, float fade_from_multiplier) |
| Calculate linear fade by multiplying from 0 to 1 for. | |
| NONNULL void | dsp_linear_fade_out_to (float *dest, int32_t start_offset, int32_t total_frames_to_fade, size_t size, float fade_to_multiplier) |
| Calculate linear fade by multiplying from 0 to 1 for. | |
| NONNULL void | dsp_make_mono (float *l, float *r, size_t size, bool equal_power) |
| Makes the two signals mono. | |
Optimized DSP functions.
Definition in file dsp.h.
| NONNULL void dsp_linear_fade_in_from | ( | float * | dest, |
| int32_t | start_offset, | ||
| int32_t | total_frames_to_fade, | ||
| size_t | size, | ||
| float | fade_from_multiplier ) |
Calculate linear fade by multiplying from 0 to 1 for.
| total_frames_to_fade | samples. |
| fade_from_multiplier | is < 1k. |
| start_offset | Start offset in the fade interval. |
| total_frames_to_fade | Total frames that should be faded. |
| size | Number of frames to process. |
| fade_from_multiplier | Multiplier to fade from (0 to fade from silence.) |
| NONNULL void dsp_linear_fade_out_to | ( | float * | dest, |
| int32_t | start_offset, | ||
| int32_t | total_frames_to_fade, | ||
| size_t | size, | ||
| float | fade_to_multiplier ) |
Calculate linear fade by multiplying from 0 to 1 for.
| total_frames_to_fade | samples. |
| start_offset | Start offset in the fade interval. |
| total_frames_to_fade | Total frames that should be faded. |
| size | Number of frames to process. |
| fade_to_multiplier | Multiplier to fade to (0 to fade to silence.) |
| NONNULL void dsp_make_mono | ( | float * | l, |
| float * | r, | ||
| size_t | size, | ||
| bool | equal_power ) |
Makes the two signals mono.
| equal_power | True for equal power, false for equal amplitude. |