Convolver.h File Reference

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

Go to the source code of this file.


class  csl::Convolver


namespace  csl
 < we use the STL vector, map, and string classes


#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.

Referenced by csl::Convolver::initialize().

#define initvec ( name,
type   ) 


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

#define cmac ( in1,
out   ) 


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

Referenced by csl::BinauralPanner::nextBuffer().

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

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

#define cbarb ( buf,
amt   ) 


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

Generated on Thu Sep 17 23:14:16 2009 for CSL by  doxygen 1.5.8