[macstl-dev] Questions on valarray use
letz at grame.fr
Tue Sep 20 17:31:37 WST 2005
I'm trying to use macstl to optimize audio mixing code, something
like the following function:
mix_buffers_with_gain (float*dst, float*src, int nframes, float gain)
stdext::valarray <float> vf1 (src, nframes);
stdext::valarray <float> vf2 (dst, nframes);
vf2 += vf1 * gain;
But it seems that dst and src buffers content is actually copied in
vst1 and vst2.
It is possible to use valarray with buffers already allocated so that
to do the computation on these arrays?
More information about the macstl-dev