25#ifndef SRC_HEADERS_GX_CONVOLVER_H_
26#define SRC_HEADERS_GX_CONVOLVER_H_
28#include <zita-convolver.h>
29#include <gxwmm/gainline.h>
80 int seek(
unsigned int posit);
81 int read(
float *data,
unsigned int frames);
95bool read_audio(
const std::string& filename,
unsigned int *audio_size,
int *audio_chan,
96 int *audio_type,
int *audio_form,
int *audio_rate,
float **buffer);
102 void adjust_values(
unsigned int audio_size,
unsigned int& count,
unsigned int& offset,
103 unsigned int& delay,
unsigned int& ldelay,
unsigned int& length,
104 unsigned int& size,
unsigned int& bufsize);
115 using Convproc::state;
118 bool start(
int policy,
int priority);
119 using Convproc::stop_process;
127 unsigned int *delay,
unsigned int offset,
unsigned int length,
128 const Gainline& points);
132 string fname,
float gain,
float lgain,
133 unsigned int delay,
unsigned int ldelay,
unsigned int offset,
134 unsigned int length,
unsigned int size,
unsigned int bufsize,
135 const Gainline& gainline);
136 bool compute(
int count,
float* input1,
float *input2,
float *output1,
float *output2);
137 bool configure(
string fname,
float gain,
unsigned int delay,
unsigned int offset,
138 unsigned int length,
unsigned int size,
unsigned int bufsize,
139 const Gainline& gainline);
140 bool compute(
int count,
float* input,
float *output);
142 const Gainline& points,
int offset);
146 double& fct,
double& gp,
unsigned int& idx,
const Gainline& points,
int offset) {
147 fct = (points[idx+1].g-points[idx].g)/(20*(points[idx+1].i-points[idx].i));
148 gp = points[idx].g/20 + fct * (offset-points[idx].i);
159 bool configure(
int count,
float *impresp,
unsigned int imprate);
160 bool update(
int count,
float *impresp,
unsigned int imprate);
161 bool compute(
int count,
float* input,
float *output);
168 bool compute_stereo(
int count,
float* input,
float* input1,
float *output,
float *output1);
int open_read(string name)
int seek(unsigned int posit)
unsigned int size(void) const
int read(float *data, unsigned int frames)
unsigned int get_samplerate()
void set_samplerate(unsigned int sr)
unsigned int get_buffersize()
void adjust_values(unsigned int audio_size, unsigned int &count, unsigned int &offset, unsigned int &delay, unsigned int &ldelay, unsigned int &length, unsigned int &size, unsigned int &bufsize)
bool start(int policy, int priority)
void set_buffersize(unsigned int sz)
gx_resample::StreamingResampler resamp
bool configure(string fname, float gain, float lgain, unsigned int delay, unsigned int ldelay, unsigned int offset, unsigned int length, unsigned int size, unsigned int bufsize, const Gainline &gainline)
bool compute(int count, float *input, float *output)
bool read_sndfile(Audiofile &audio, int nchan, int samplerate, const float *gain, unsigned int *delay, unsigned int offset, unsigned int length, const Gainline &points)
static void compute_interpolation(double &fct, double &gp, unsigned int &idx, const Gainline &points, int offset)
bool compute(int count, float *input1, float *input2, float *output1, float *output2)
bool configure(string fname, float gain, unsigned int delay, unsigned int offset, unsigned int length, unsigned int size, unsigned int bufsize, const Gainline &gainline)
bool update_stereo(int count, float *impresp, unsigned int imprate)
bool compute_stereo(int count, float *input, float *input1, float *output, float *output1)
bool configure_stereo(int count, float *impresp, unsigned int imprate)
bool compute(int count, float *input, float *output)
GxSimpleConvolver(gx_resample::BufferResampler &resamp_)
gx_resample::BufferResampler & resamp
bool compute_stereo(int count, float *buffer, float *buffer1)
bool configure(int count, float *impresp, unsigned int imprate)
bool update(int count, float *impresp, unsigned int imprate)
bool compute(int count, float *buffer)
bool read_audio(const std::string &filename, unsigned int *audio_size, int *audio_chan, int *audio_type, int *audio_form, int *audio_rate, float **buffer)