SAF
Loading...
Searching...
No Matches
decorrelator.h

A multi-channel decorrelator.

A multi-channel decorrelator

Files

decorrelator.h (include), decorrelator_internal.h, decorrelator.c, decorrelator_internal.c

Include Header

/*
* Copyright 2020 Leo McCormack
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __DECORRELATOR_H_INCLUDED__
#define __DECORRELATOR_H_INCLUDED__
#include "_common.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* ========================================================================== */
/* Main Functions */
/* ========================================================================== */
void decorrelator_create(void** const phDecor);
void decorrelator_destroy(void** const phDecor);
void decorrelator_init(void* const hDecor,
int samplerate);
void decorrelator_initCodec(void* const hDecor);
void decorrelator_process(void* const hDecor,
const float *const * inputs,
float* const* outputs,
int nInputs,
int nOutputs,
int nSamples);
/* ========================================================================== */
/* Set Functions */
/* ========================================================================== */
void decorrelator_refreshParams(void* const hDecor);
void decorrelator_setNumberOfChannels(void* const hDecor,
int newValue);
void decorrelator_setDecorrelationAmount(void* const hDecor,
float newValue);
void decorrelator_setLevelCompensationFlag(void* const hDecor,
int newValue);
void decorrelator_setTransientBypassFlag(void* const hDecor,
int newValue);
/* ========================================================================== */
/* Get Functions */
/* ========================================================================== */
float decorrelator_getProgressBar0_1(void* const hDecor);
void decorrelator_getProgressBarText(void* const hDecor, char* text);
int decorrelator_getNumberOfChannels(void* const hDecor);
float decorrelator_getDecorrelationAmount(void* const hDecor);
int decorrelator_getLevelCompensationFlag(void* const hDecor);
int decorrelator_getTransientBypassFlag(void* const hDecor);
int decorrelator_getDAWsamplerate(void* const hDecor);
#ifdef __cplusplus
} /* extern "C" { */
#endif /* __cplusplus */
#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.