Adam D. Moss
adam at gimp.org
Thu Oct 13 11:19:56 PDT 2005
Prakash Punnoor wrote:
> Just as a side note: I made most stuff
> static inline, as you probably want to use the reverb at only one place
> in your sources.
Since the implementation is all in the header (!!! thanks C++!)
I think you don't have much choice without causing linker errors
when used from more than one code module, but the right thing
to do would be to turn this into a .c module and de-static
> freeverb takes some other parameters, so I need to find out what are
> reasonable values... Esp I am a bit confused about freeverb as it only
> seems to want stereo sources. What do I do with mono sources?
I think it wants stereo-in because it generates stereo-out.
I assume it does THAT because it ends up splitting frequencies
which may get moved to left or right according to room parameters...
*outputL = outL*this->wet1 + outR*this->wet2 + *inputL*this->dry;
*outputR = outR*this->wet1 + outL*this->wet2 + *inputR*this->dry;
(and, the tunings vary from left to right)
So I guess for mono, provide a stereo sample with the mono
sample duplicated to both channels, and the result will be
stereo with some asymmetry.
> furthmore I wonder what to do with the tunings? The settings are for
> 44,1kHz. OpenAL canon speed is something like 22kHz, isn't it?
OpenAL/SI's canonical frequency is entirely tuneable at runtime,
so many of these hardcoded constants would have to be un-hardcoded.
The tuning.h magic numbers are pretty icky. :( But at least
the comments say that the tuning[LR] constants can be 'scaled',
which is a clue about what to do (I think it means that f.e.
'1116' gets scaled to 1116*n, and '1116+stereospread' gets
scaled to 1116*scale+stereospread, not (1116+stereospread)*scale ).
More information about the Openal-devel