Convolver.h File Reference

#include "CSL_Core.h"
#include "Spectral.h"

Go to the source code of this file.

Namespaces

namespace  csl

Classes

class  csl::Convolver

Defines

#define CHECK_PTR(ptr)   if (!ptr) throw MemoryError("Can't allocate buffer")
 Pointer checking.
#define initvec(name, size, type)
#define cmac(in1, in2, out)
#define cbinc(buf, size)   if (++buf > size-1) buf = 0;
#define cbdec(buf, size)   if (--buf < 0) buf = size - 1;
#define cbarb(buf, size, amt)


Define Documentation

#define CHECK_PTR ptr   )     if (!ptr) throw MemoryError("Can't allocate buffer")
 

Pointer checking.

Convolver.h -- The low-latency convolution classes. See the copyright notice and acknowledgment of authors in the file COPYRIGHT

This is the canonical stored IR FFT-based convolver. On start-up it stores the FFT spectra of the windows of the impulse response. At run-=time it stores the current frame's input FFT and sums up the former inputs with the IR windows in reverse order, creating the summed tail of the IR over past inputs.

#define initvec name,
size,
type   ) 
 

Value:

if ((name = (type *) calloc(size, sizeof(type))) == NULL)  \
        throw MemoryError("Can't allocate buffer");

#define cmac in1,
in2,
out   ) 
 

Value:

out[0] += in1[0] * in2[0] - in1[1] * in2[1];        \
    out[1] += in1[0] * in2[1] + in1[1] * in2[0];

#define cbinc buf,
size   )     if (++buf > size-1) buf = 0;
 

#define cbdec buf,
size   )     if (--buf < 0) buf = size - 1;
 

#define cbarb buf,
size,
amt   ) 
 

Value:

buf += amt;                             \
    if (buf >= size) buf -= size;                   \
    else if (buf < 0) buf += size;


Generated on Fri Apr 6 20:18:14 2007 for CSL by  doxygen 1.4.5-20051010