Convolver.h File Reference

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

Go to the source code of this file.


Classes

class  csl::Convolver

Namespaces

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

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.

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

#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];

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,
size,
amt   ) 

Value:

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