10 Mar
2009
10 Mar
'09
12:47 p.m.
2009/3/10 Kassen
I also wonder why Pan2 is more expensive than 2 Gains; we could use 2 Gain Ugens (and a function) to emulate it, maybe this instead tests a higher cost for forcing the DAC to operate in stereo?
As far as I can tell, Gain is implemented almost as a noop UGen: // from ugen_xxx.cpp if( !type_engine_import_ugen_begin( env, "Gain", "UGen", env->global(), NULL, NULL, NULL, NULL ) ) return FALSE; Those NULLs are function pointers for a constructor, destructor, tick (sample generator), and something else I don't know about. There is probably no Gain-specific code; it only needs behavior that's shared among all UGens anyway, whereas Pan2 has Pan2-specific behavior. -- Tom Lieber http://AllTom.com/