24#ifndef __TVCONV_H_INCLUDED__
25#define __TVCONV_H_INCLUDED__
92 float*
const*
const inputs,
93 float*
const*
const outputs,
A bunch of things that are common to many of the saf examples.
CODEC_STATUS
Current status of the codec.
float tvconv_getListenerPosition(void *const hTVCnv, int index, int dim)
Returns the current coordinate of dimension dim (0 ... NUM_DIMENSIONS-1)
SAF_TVCONV_ERROR_CODES
SOFA loader error codes.
@ SAF_TVCONV_SOFA_ERROR_INVALID_FILE_OR_FILE_PATH
Not a SOFA file, or no such file was found in the specified location.
@ SAF_TVCONV_SOFA_ERROR_NETCDF_IN_USE
NetCDF is not thread safe!
@ SAF_TVCONV_SOFA_ERROR_FORMAT_UNEXPECTED
The data-type of the SOFA data was not as expected.
@ SAF_TVCONV_SOFA_ERROR_DIMENSIONS_UNEXPECTED
Dimensions of the SOFA data were not as expected.
@ SAF_TVCONV_SOFA_OK
None of the error checks failed.
@ SAF_TVCONV_NOT_INIT
Not initialized.
@ SAF_TVCONV_SOFA_LOADING
Loading file.
void tvconv_process(void *const hTVCnv, float *const *const inputs, float *const *const outputs, int nInputs, int nOutputs, int nSamples)
Performs the time-varying convolution processing.
int tvconv_getIRFs(void *const hTVCnv)
Returns the samplerate of the loaded filters
void tvconv_refreshParams(void *const hTVCnv)
Sets all intialisation flags to 1.
int tvconv_getProcessingDelay(void *const hTVCnv)
Returns the processing delay in samples (may be used for delay compensation features)
CODEC_STATUS tvconv_getCodecStatus(void *const hTVCnv)
Returns current codec status (see CODEC_STATUS enum)
void tvconv_setFiltersAndPositions(void *const hTVCnv)
Reads IRs and positions from the current sofa file path.
char * tvconv_getSofaFilePath(void *const hTVCnv)
Returns the current Sofa file path.
void tvconv_create(void **const phTVCnv)
Creates an instance of tvconv.
float tvconv_getSourcePosition(void *const hTVCnv, int dim)
Returns the source coordinate of dimension dim (0 ... NUM_DIMENSIONS-1)
void tvconv_setTargetPosition(void *const hTVCnv, float position, int dim)
Sets the target listener position.
int tvconv_getIRLength(void *const hTVCnv)
Returns the current filter length, in samples.
int tvconv_getNumListenerPositions(void *const hTVCnv)
Returns the number of listener positions in the loaded sofa file.
int tvconv_getNumIRs(void *const hTVCnv)
Returns the number of IR channels in the loaded sofa file.
int tvconv_getHostBlockSize(void *const hTVCnv)
Returns the currect host block size.
void tvconv_init(void *const hTVCnv, int samplerate, int hostBlockSize)
Initialises an instance of tvconv with default settings.
int tvconv_getHostFs(void *const hTVCnv)
Returns the samperate of the host.
SAF_TVCONV_ERROR_CODES tvconv_getSofaErrorState(void *const hTVCnv)
Returns the current Sofa file error state.
void tvconv_setSofaFilePath(void *const hTVCnv, const char *path)
Sets current sofa file path.
int tvconv_getListenerPositionIdx(void *const hTVCnv)
Returns the index of the current IR position.
float tvconv_getMinDimension(void *const hTVCnv, int dim)
Returns minimum cooridinate of dimension dim (0 ... NUM_DIMENSIONS-1)
float tvconv_getTargetPosition(void *const hTVCnv, int dim)
Returns the current coordinate of dimension dim (0 ... NUM_DIMENSIONS-1)
float tvconv_getMaxDimension(void *const hTVCnv, int dim)
Returns minimum cooridinate of dimension dim (0 ... NUM_DIMENSIONS-1)
int tvconv_getNumInputChannels(void *const hTVCnv)
Returns the number input channels.
int tvconv_getNumOutputChannels(void *const hTVCnv)
Returns the number of output channels (the same as the number of channels in the loaded sofa file)
int tvconv_getFrameSize(void)
Returns the processing framesize (i.e., number of samples processed with every _process() call )
void tvconv_checkReInit(void *const hTVCnv)
Checks whether things have to be reinitialised, and does so if it is needed.
void tvconv_destroy(void **const phTVCnv)
Destroys an instance of tvconv.