TSampleRef<SampleType, Q> Ref version of TSample. 更多...
#include <Dsp.h>
TSampleRef<SampleType, Q> Ref version of TSample.
Useful for converting between fixed and float precisions. Example usage: int16 FixedPrecisionSample; TSampleRef<int16, 15> SampleRef(FixedPrecisionSample);
// Set the sample value directly: SampleRef = 0.5f;
// Or multiply the the sample: SampleRef *= 0.5f;
bool bThisCodeWorks = FixedPrecisionSample == TNumericLimits<int16>::Max() / 4;