TSampleRef

TSampleRef Ref version of [TSample](API\Runtime\SignalProcessing\DSP\TSample).

Windows
MacOS
Linux

References

Module

SignalProcessing

Header

/Engine/Source/Runtime/SignalProcessing/Public/DSP/Dsp.h

Include

#include "DSP/Dsp.h"

Syntax

template<typename SampleType, uint32 Q>
class TSampleRef

Remarks

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;

Constructors

Name Description

Public function

TSampleRef

(
    SampleType& InSample
)

Functions

Name Description

Public function

ReturnType

 

AsFixedPrecisionInt()

Public function Const

ReturnType

 

AsFloat()

Operators

Name Description

Public function

TSampleRef< ...

 

operator=

(
    const OtherSampleType InSample
)

Constants

Name

Description

MaxValue

For fixed precision types, the max and min values that we can represent are calculated here:

MinValue

QFactor

This is the number used to convert from float to our fixed precision value.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss