SAF
Loading...
Searching...
No Matches
multiconv.c File Reference

A multi-channel convolver. More...

#include "multiconv.h"
#include "multiconv_internal.h"

Go to the source code of this file.

Functions

void multiconv_create (void **const phMCnv)
 Creates an instance of multiconv.
 
void multiconv_destroy (void **const phMCnv)
 Destroys an instance of multiconv.
 
void multiconv_init (void *const hMCnv, int sampleRate, int hostBlockSize)
 Initialises an instance of multiconv with default settings.
 
void multiconv_process (void *const hMCnv, const float *const *inputs, float *const *const outputs, int nInputs, int nOutputs, int nSamples)
 Performs the multuchannel convolution processing.
 
void multiconv_refreshParams (void *const hMCnv)
 Sets all intialisation flags to 1.
 
void multiconv_checkReInit (void *const hMCnv)
 Checks whether things have to be reinitialised, and does so if it is needed.
 
void multiconv_setFilters (void *const hMCnv, const float *const *H, int numChannels, int numSamples, int sampleRate)
 Loads the multichannel of filters.
 
void multiconv_setEnablePart (void *const hMCnv, int newState)
 Enable (1), disable (0), partitioned convolution.
 
void multiconv_setNumChannels (void *const hMCnv, int newValue)
 Sets the number of input/output channels.
 
int multiconv_getEnablePart (void *const hMCnv)
 Returns a flag indicating whether partitioned convolution is enabled (1) or disabled (0)
 
int multiconv_getNumChannels (void *const hMCnv)
 Returns the number input/output channels.
 
int multiconv_getHostBlockSize (void *const hMCnv)
 Returns the currect host block size.
 
int multiconv_getNfilters (void *const hMCnv)
 Returns the number of filters in the loaded wav file.
 
int multiconv_getFilterLength (void *const hMCnv)
 Returns the current filter length, in samples.
 
int multiconv_getFilterFs (void *const hMCnv)
 Returns the samplerate of the loaded filters.
 
int multiconv_getHostFs (void *const hMCnv)
 Returns the samperate of the host.
 
int multiconv_getProcessingDelay (void *const hMCnv)
 Returns the processing delay in samples (may be used for delay compensation features)
 

Detailed Description

A multi-channel convolver.

Author
Leo McCormack
Date
23.09.2019
License
ISC

Definition in file multiconv.c.

Function Documentation

◆ multiconv_checkReInit()

void multiconv_checkReInit ( void *const hMCnv)

Checks whether things have to be reinitialised, and does so if it is needed.

Definition at line 170 of file multiconv.c.

◆ multiconv_create()

void multiconv_create ( void **const phMCnv)

Creates an instance of multiconv.

Parameters
[in]phMCnv(&) address of multiconv handle

Definition at line 28 of file multiconv.c.

◆ multiconv_destroy()

void multiconv_destroy ( void **const phMCnv)

Destroys an instance of multiconv.

Parameters
[in]phMCnv(&) address of multiconv handle

Definition at line 60 of file multiconv.c.

◆ multiconv_getEnablePart()

int multiconv_getEnablePart ( void *const hMCnv)

Returns a flag indicating whether partitioned convolution is enabled (1) or disabled (0)

Definition at line 238 of file multiconv.c.

◆ multiconv_getFilterFs()

int multiconv_getFilterFs ( void *const hMCnv)

Returns the samplerate of the loaded filters.

Definition at line 268 of file multiconv.c.

◆ multiconv_getFilterLength()

int multiconv_getFilterLength ( void *const hMCnv)

Returns the current filter length, in samples.

Definition at line 262 of file multiconv.c.

◆ multiconv_getHostBlockSize()

int multiconv_getHostBlockSize ( void *const hMCnv)

Returns the currect host block size.

Definition at line 250 of file multiconv.c.

◆ multiconv_getHostFs()

int multiconv_getHostFs ( void *const hMCnv)

Returns the samperate of the host.

Definition at line 274 of file multiconv.c.

◆ multiconv_getNfilters()

int multiconv_getNfilters ( void *const hMCnv)

Returns the number of filters in the loaded wav file.

Definition at line 256 of file multiconv.c.

◆ multiconv_getNumChannels()

int multiconv_getNumChannels ( void *const hMCnv)

Returns the number input/output channels.

Definition at line 244 of file multiconv.c.

◆ multiconv_getProcessingDelay()

int multiconv_getProcessingDelay ( void *const hMCnv)

Returns the processing delay in samples (may be used for delay compensation features)

Definition at line 280 of file multiconv.c.

◆ multiconv_init()

void multiconv_init ( void *const hMCnv,
int samplerate,
int hostBlockSize )

Initialises an instance of multiconv with default settings.

Parameters
[in]hMCnvmulticonv handle
[in]samplerateHost samplerate
[in]hostBlockSizeHost frame/block size

Definition at line 80 of file multiconv.c.

◆ multiconv_process()

void multiconv_process ( void *const hMCnv,
const float *const * inputs,
float *const *const outputs,
int nInputs,
int nOutputs,
int nSamples )

Performs the multuchannel convolution processing.

Parameters
[in]hMCnvmulticonv handle
[in]inputsInput channel buffers; 2-D array: nInputs x nSamples
[in]outputsOutput channel buffers; 2-D array: nOutputs x nSamples
[in]nInputsNumber of input channels
[in]nOutputsNumber of output channels
[in]nSamplesNumber of samples in 'inputs'/'output' matrices

Definition at line 100 of file multiconv.c.

◆ multiconv_refreshParams()

void multiconv_refreshParams ( void *const hMCnv)

Sets all intialisation flags to 1.

Re-initialising all settings/variables, as multiconv is currently configured, at next available opportunity.

Definition at line 164 of file multiconv.c.

◆ multiconv_setEnablePart()

void multiconv_setEnablePart ( void *const hMCnv,
int newState )

Enable (1), disable (0), partitioned convolution.

Definition at line 221 of file multiconv.c.

◆ multiconv_setFilters()

void multiconv_setFilters ( void *const hMCnv,
const float *const * H,
int numChannels,
int numSamples,
int sampleRate )

Loads the multichannel of filters.

Parameters
[in]hMCnvmulticonv handle
[in]HInput channel buffers; 2-D array: numChannels x nSamples
[in]numChannelsNumber of channels in loaded data (also the number of outputs)
[in]numSamplesNumber of samples (per channel) in the loaded data
[in]sampleRateSamplerate of the loaded data

Definition at line 200 of file multiconv.c.

◆ multiconv_setNumChannels()

void multiconv_setNumChannels ( void *const hMCnv,
int newValue )

Sets the number of input/output channels.

Definition at line 230 of file multiconv.c.