20 #ifndef ARDOUR_ZITA_CONVOLVER_H
21 #define ARDOUR_ZITA_CONVOLVER_H
30 #if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(PTW32_VERSION) || defined(__WINPTHREADS_VERSION)
31 #include <semaphore.h>
36 #ifdef ZCSEMA_IS_IMPLEMENTED
37 #undef ZCSEMA_IS_IMPLEMENTED
41 #if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(PTW32_VERSION) || defined (__WINPTHREADS_VERSION)
56 int init (
int s,
int v)
58 return sem_init (&_sema, s, v);
63 return sem_post (&_sema);
68 return sem_wait (&_sema);
73 return sem_trywait (&_sema);
77 ZCsema (
const ZCsema&);
78 ZCsema& operator= (
const ZCsema&);
83 #define ZCSEMA_IS_IMPLEMENTED
85 #elif defined (__APPLE__)
97 ZCsema (
void) : _count (0)
104 pthread_mutex_destroy (&_mutex);
105 pthread_cond_destroy (&_cond);
108 ZCsema (
const ZCsema&);
109 ZCsema& operator= (
const ZCsema&);
111 int init (
int s,
int v)
114 return pthread_mutex_init (&_mutex, 0) || pthread_cond_init (&_cond, 0);
119 pthread_mutex_lock (&_mutex);
122 pthread_cond_signal (&_cond);
124 pthread_mutex_unlock (&_mutex);
130 pthread_mutex_lock (&_mutex);
132 pthread_cond_wait (&_cond, &_mutex);
135 pthread_mutex_unlock (&_mutex);
141 if (pthread_mutex_trylock (&_mutex)) {
145 pthread_mutex_unlock (&_mutex);
149 pthread_mutex_unlock (&_mutex);
155 pthread_mutex_t _mutex;
156 pthread_cond_t _cond;
159 #define ZCSEMA_IS_IMPLEMENTED
162 #ifndef ZCSEMA_IS_IMPLEMENTED
163 #error "The ZCsema class is not implemented."
236 OPT_FFTW_MEASURE = 1,
272 void start (
int absprio,
int policy);
337 FL_LATE = 0x0000FFFF,
365 return _inpbuff[inp] + _inpoffs;
370 return _outbuff[out] + _outoffs;
411 float* _inpbuff[MAXINP];
412 float* _outbuff[MAXOUT];
void start(int absprio, int policy)
fftwf_complex * _freq_data
void configure(int prio, uint32_t offs, uint32_t npar, uint32_t parsize, uint32_t options)
void impdata_write(uint32_t inp, uint32_t out, int32_t step, float *data, int32_t ind0, int32_t ind1, bool create)
Macnode * findmacnode(uint32_t inp, uint32_t out, bool create)
int readtail(uint32_t n_samples)
void fftswap(fftwf_complex *p)
void impdata_clear(uint32_t inp, uint32_t out)
static void * static_main(void *arg)
void reset(uint32_t inpsize, uint32_t outsize, float **inpbuff, float **outbuff)
float * inpdata(uint32_t inp) const
bool check_started(uint32_t)
void set_options(uint32_t options)
int start_process(int abspri, int policy)
float * outdata(uint32_t out) const
int configure(uint32_t ninp, uint32_t nout, uint32_t maxsize, uint32_t quantum, uint32_t minpart, uint32_t maxpart, float density)
int impdata_create(uint32_t inp, uint32_t out, int32_t step, float *data, int32_t ind0, int32_t ind1)
void print(FILE *F=stdout)
int tailonly(uint32_t n_samples)
uint32_t state(void) const
int impdata_clear(uint32_t inp, uint32_t out)
void alloc_ffta(uint16_t npar, int32_t size)
void alloc_fftb(uint16_t npar)
Outnode(uint16_t out, int32_t size)
bool init(bool try_optimization, const char *localedir, bool with_gui=false)
GTKMM_API const Gtk::BuiltinStockID FILE
#define LIBZCONVOLVER_API