25 #ifndef CSL_BINAURAL_H
26 #define CSL_BINAURAL_H
31 #define SUM_DOWNS 1 // scale # blocks to sum (16 / SUM_DOWNS)
32 #define FFT_DOWNS 2 // scale IFFT len (FFT_DOWNS * blockSize)
33 #define LEN_DOWNS 1 // scale sum len (513 / LEN_DOWNS)
35 #define SUM_DOWNS 1 // scale # blocks to sum (16 / SUM_DOWNS)
36 #define FFT_DOWNS 2 // scale IFFT len (FFT_DOWNS * blockSize)
37 #define LEN_DOWNS 1 // scale sum len (513 / LEN_DOWNS)
42 class BinauralSourceCache;
sample * SampleBuffer
1-channel buffer data type, vector of (sample)
SampleComplex * SampleComplexVector
complex vector
SampleComplexVector * mInSpect
complex spectra of mNumBlocks past inputs
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
SampleBuffer mIFFTOutR
outputs of the IFFT
#define HRTF_BLOCK_SIZE
BinauralDB.h – Specification of the HRTF file format and database This is the CSL 5 version that use...
BinauralSourceCache(BinauralPanner *parent)
BinauralPanner(unsigned blockSize=HRTF_BLOCK_SIZE)
void nextBuffer(Buffer &outputBuffer)
work-horse method reads & transforms input, sums previous data, and takes the IFFT for each of multip...
unsigned mNumBlocks
size of caches (16)
SampleBuffer mPrevOutR
previous sample window from the IFFT
unsigned mBlockInd
block index
Base class for all panners. Handles source management and holds a speaker layout. ...
unsigned mNumBlocksToSum
blocks to include in sum per HRTF
void * cache()
Returns an instance of its cache data per sound source.
BinauralSourceCache: used for caching previous state of spatial sources. This has the history of inpu...
unsigned mNumBlocks
blocks per HRTF
unsigned mFramesPerBlock
frames per block
FFT_Wrapper mInFFT
FFT Wrappers for in and out processing.
Buffer – the multi-channel sample buffer class (passed around between generators and IO guys)...
SampleComplexVector mHOutR
buffers for the mixed HRTF & input data pre-IFFT
unsigned * mHRTF
list of block IDs of the "split" hrtf
SampleComplexVector mHOutL
Buffer mOutBuf
temp buffers for input and FFT wrappers
Base class of CSL exceptions (written upper-case). Has a string message.