SAF
|
A standard matrix convolver. More...
#include "_common.h"
Go to the source code of this file.
Functions | |
void | matrixconv_create (void **const phMCnv) |
Creates an instance of matrixconv. | |
void | matrixconv_destroy (void **const phMCnv) |
Destroys an instance of matrixconv. | |
void | matrixconv_init (void *const hMCnv, int samplerate, int hostBlockSize) |
Initialises an instance of matrixconv with default settings. | |
void | matrixconv_process (void *const hMCnv, const float *const *inputs, float *const *const outputs, int nInputs, int nOutputs, int nSamples) |
Performs the matrix convolution processing. | |
void | matrixconv_refreshParams (void *const hMCnv) |
Sets all intialisation flags to 1. | |
void | matrixconv_checkReInit (void *const hMCnv) |
Checks whether things have to be reinitialised, and does so if it is needed. | |
void | matrixconv_setFilters (void *const hMCnv, const float *const *H, int numChannels, int numSamples, int sampleRate) |
Loads the matrix of filters, which should have the input filters concatenated for each output. | |
void | matrixconv_setEnablePart (void *const hMCnv, int newState) |
Enable (1), disable (0), partitioned convolution. | |
void | matrixconv_setNumInputChannels (void *const hMCnv, int newValue) |
Sets the number of input channels. | |
int | matrixconv_getFrameSize (void) |
Returns the processing framesize (i.e., number of samples processed with every _process() call ) | |
int | matrixconv_getEnablePart (void *const hMCnv) |
Returns a flag indicating whether partitioned convolution is enabled (1) or disabled (0) | |
int | matrixconv_getNumInputChannels (void *const hMCnv) |
Returns the number input channels. | |
int | matrixconv_getNumOutputChannels (void *const hMCnv) |
Returns the number of output channels (the same as the number of channels in the loaded wav file) | |
int | matrixconv_getHostBlockSize (void *const hMCnv) |
Returns the currect host block size. | |
int | matrixconv_getNfilters (void *const hMCnv) |
Returns the number of filters in the loaded wav file (number of outputs multiplied by the number of inputs) | |
int | matrixconv_getFilterLength (void *const hMCnv) |
Returns the current filter length, in samples. | |
int | matrixconv_getFilterFs (void *const hMCnv) |
Returns the samplerate of the loaded filters. | |
int | matrixconv_getHostFs (void *const hMCnv) |
Returns the samperate of the host. | |
int | matrixconv_getProcessingDelay (void *const hMCnv) |
Returns the processing delay in samples (may be used for delay compensation features) | |
void matrixconv_checkReInit | ( | void *const | hMCnv | ) |
Checks whether things have to be reinitialised, and does so if it is needed.
Definition at line 172 of file matrixconv.c.
void matrixconv_create | ( | void **const | phMCnv | ) |
Creates an instance of matrixconv.
[in] | phMCnv | (&) address of matrixconv handle |
Definition at line 28 of file matrixconv.c.
void matrixconv_destroy | ( | void **const | phMCnv | ) |
Destroys an instance of matrixconv.
[in] | phMCnv | (&) address of matrixconv handle |
Definition at line 60 of file matrixconv.c.
int matrixconv_getEnablePart | ( | void *const | hMCnv | ) |
Returns a flag indicating whether partitioned convolution is enabled (1) or disabled (0)
Definition at line 266 of file matrixconv.c.
int matrixconv_getFilterFs | ( | void *const | hMCnv | ) |
Returns the samplerate of the loaded filters.
Definition at line 302 of file matrixconv.c.
int matrixconv_getFilterLength | ( | void *const | hMCnv | ) |
Returns the current filter length, in samples.
Definition at line 296 of file matrixconv.c.
int matrixconv_getHostBlockSize | ( | void *const | hMCnv | ) |
Returns the currect host block size.
Definition at line 284 of file matrixconv.c.
int matrixconv_getHostFs | ( | void *const | hMCnv | ) |
Returns the samperate of the host.
Definition at line 308 of file matrixconv.c.
int matrixconv_getNfilters | ( | void *const | hMCnv | ) |
Returns the number of filters in the loaded wav file (number of outputs multiplied by the number of inputs)
Definition at line 290 of file matrixconv.c.
int matrixconv_getNumInputChannels | ( | void *const | hMCnv | ) |
Returns the number input channels.
Definition at line 272 of file matrixconv.c.
int matrixconv_getNumOutputChannels | ( | void *const | hMCnv | ) |
Returns the number of output channels (the same as the number of channels in the loaded wav file)
Definition at line 278 of file matrixconv.c.
int matrixconv_getProcessingDelay | ( | void *const | hMCnv | ) |
Returns the processing delay in samples (may be used for delay compensation features)
Definition at line 314 of file matrixconv.c.
void matrixconv_init | ( | void *const | hMCnv, |
int | samplerate, | ||
int | hostBlockSize ) |
Initialises an instance of matrixconv with default settings.
[in] | hMCnv | matrixconv handle |
[in] | samplerate | Host samplerate. |
[in] | hostBlockSize | Host frame/block size |
Definition at line 80 of file matrixconv.c.
void matrixconv_process | ( | void *const | hMCnv, |
const float *const * | inputs, | ||
float *const *const | outputs, | ||
int | nInputs, | ||
int | nOutputs, | ||
int | nSamples ) |
Performs the matrix convolution processing.
[in] | hMCnv | matrixconv handle |
[in] | inputs | Input channel buffers; 2-D array: nInputs x nSamples |
[in] | outputs | Output channel buffers; 2-D array: nOutputs x nSamples |
[in] | nInputs | Number of input channels |
[in] | nOutputs | Number of output channels |
[in] | nSamples | Number of samples in 'inputs'/'output' matrices |
Definition at line 100 of file matrixconv.c.
void matrixconv_refreshParams | ( | void *const | hMCnv | ) |
Sets all intialisation flags to 1.
Re-initialising all settings/variables, as matrixconv is currently configured, at next available opportunity.
Definition at line 166 of file matrixconv.c.
void matrixconv_setEnablePart | ( | void *const | hMCnv, |
int | newState ) |
Enable (1), disable (0), partitioned convolution.
Definition at line 242 of file matrixconv.c.
void matrixconv_setFilters | ( | void *const | hMCnv, |
const float *const * | H, | ||
int | numChannels, | ||
int | numSamples, | ||
int | sampleRate ) |
Loads the matrix of filters, which should have the input filters concatenated for each output.
For example, a matrix: 25 x 32 x 512 (numInputs x numOutputs x filterLength) should be loaded as a 25 x 16384 (note 32x512=16384).
This is then divided by the number of inputs, which should be user specified to be 32 in this case.
[in] | hMCnv | matrixconv handle |
[in] | H | Input channel buffers; 2-D array: numChannels x nSamples |
[in] | numChannels | Number of channels in loaded data (also the number of outputs) |
[in] | numSamples | Number of samples (per channel) in the loaded data |
[in] | sampleRate | Samplerate of the loaded data |
Definition at line 209 of file matrixconv.c.
void matrixconv_setNumInputChannels | ( | void *const | hMCnv, |
int | newValue ) |
Sets the number of input channels.
Definition at line 251 of file matrixconv.c.