SAF
Loading...
Searching...
No Matches
decorrelator.h
Go to the documentation of this file.
1/*
2 * Copyright 2020 Leo McCormack
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 * PERFORMANCE OF THIS SOFTWARE.
15 */
16
36#ifndef __DECORRELATOR_H_INCLUDED__
37#define __DECORRELATOR_H_INCLUDED__
38
39#include "_common.h"
40
41#ifdef __cplusplus
42extern "C" {
43#endif /* __cplusplus */
44
45/* ========================================================================== */
46/* Main Functions */
47/* ========================================================================== */
48
54void decorrelator_create(void** const phDecor);
55
61void decorrelator_destroy(void** const phDecor);
62
71void decorrelator_init(void* const hDecor,
72 int samplerate);
73
89void decorrelator_initCodec(void* const hDecor);
90
101void decorrelator_process(void* const hDecor,
102 const float *const * inputs,
103 float* const* outputs,
104 int nInputs,
105 int nOutputs,
106 int nSamples);
107
108
109/* ========================================================================== */
110/* Set Functions */
111/* ========================================================================== */
112
117void decorrelator_refreshParams(void* const hDecor);
118
120void decorrelator_setNumberOfChannels(void* const hDecor,
121 int newValue);
122
124void decorrelator_setDecorrelationAmount(void* const hDecor,
125 float newValue);
126
128void decorrelator_setLevelCompensationFlag(void* const hDecor,
129 int newValue);
130
132void decorrelator_setTransientBypassFlag(void* const hDecor,
133 int newValue);
134
135
136/* ========================================================================== */
137/* Get Functions */
138/* ========================================================================== */
139
145
147CODEC_STATUS decorrelator_getCodecStatus(void* const hDecor);
148
152float decorrelator_getProgressBar0_1(void* const hDecor);
153
160void decorrelator_getProgressBarText(void* const hDecor, char* text);
161
163int decorrelator_getNumberOfChannels(void* const hDecor);
164
166float decorrelator_getDecorrelationAmount(void* const hDecor);
167
169int decorrelator_getLevelCompensationFlag(void* const hDecor);
170
172int decorrelator_getTransientBypassFlag(void* const hDecor);
173
175int decorrelator_getDAWsamplerate(void* const hDecor);
176
182
183
184#ifdef __cplusplus
185} /* extern "C" { */
186#endif /* __cplusplus */
187
188#endif /* __DECORRELATOR_H_INCLUDED__ */
A bunch of things that are common to many of the saf examples.
CODEC_STATUS
Current status of the codec.
Definition _common.h:201
void decorrelator_process(void *const hDecor, const float *const *inputs, float *const *outputs, int nInputs, int nOutputs, int nSamples)
Decorrelates the input signals.
int decorrelator_getLevelCompensationFlag(void *const hDecor)
Returns whether to apply level compensation (0 or 1)
void decorrelator_setDecorrelationAmount(void *const hDecor, float newValue)
Sets the decorrelation amount [0..1].
int decorrelator_getFrameSize(void)
Returns the processing framesize (i.e., number of samples processed with every _process() call )
int decorrelator_getProcessingDelay(void)
Returns the processing delay in samples (may be used for delay compensation features)
void decorrelator_refreshParams(void *const hDecor)
Sets intialisation flags to 1, so as to re-initialise all settings/variables (as decorrelator is curr...
int decorrelator_getDAWsamplerate(void *const hDecor)
Returns the DAW/Host sample rate.
int decorrelator_getTransientBypassFlag(void *const hDecor)
Returns whether to bypass decorrelating the transients (0 or 1)
void decorrelator_setLevelCompensationFlag(void *const hDecor, int newValue)
Sets whether to apply level compensation (0 or 1)
void decorrelator_destroy(void **const phDecor)
Destroys an instance of decorrelator.
float decorrelator_getProgressBar0_1(void *const hDecor)
(Optional) Returns current intialisation/processing progress, between 0..1
void decorrelator_getProgressBarText(void *const hDecor, char *text)
(Optional) Returns current intialisation/processing progress text
void decorrelator_setTransientBypassFlag(void *const hDecor, int newValue)
Sets whether to bypass decorrelating the transients (0 or 1)
void decorrelator_setNumberOfChannels(void *const hDecor, int newValue)
Sets the number of input/output channels.
CODEC_STATUS decorrelator_getCodecStatus(void *const hDecor)
Returns current codec status, see CODEC_STATUS enum.
int decorrelator_getNumberOfChannels(void *const hDecor)
Returns the number of input/output channels.
void decorrelator_create(void **const phDecor)
Creates an instance of decorrelator.
float decorrelator_getDecorrelationAmount(void *const hDecor)
Returns the decorrelation amount [0..1].
void decorrelator_init(void *const hDecor, int samplerate)
Initialises decorrelator with default settings, and samplerate.
void decorrelator_initCodec(void *const hDecor)
Intialises the codec variables, based on current global/user parameters.