Audio::GetInterpolationParametersAtTimestamp

GetInterpolationParametersAtTimestamp

Windows
MacOS
Linux

References

Module

AudioSynesthesiaCore

Header

/Engine/Plugins/Runtime/AudioSynesthesia/Source/AudioSynesthesiaCore/Public/InterpolateSorted.h

Include

#include "InterpolateSorted.h"

Syntax

namespace Audio
{
    template<typename ElementType>
    void Audio::GetInterpolationParametersAtTimestamp
    (
        TArrayView< const ElementType > InArray,
        float InTimestamp,
        int32 & OutLowerIndex,
        int32 & OutUpperIndex,
        float & OutAlpha
    )
}

Remarks

GetInterpolationParametersAtTimestamp

Calculates the indices and alpha parameter for interpolating between to elements in the array.

ElementType must be a type with a "float Timestamp;" member. InArray is a array of ElementTypes which are sorted in ascending order via the Timestamp member. InTimestamp is the query timestamp.

OutLowerIndex is populated with the index of the last element in InArray with a Timestamp less than or equal to InTimestamp. On error, this is set to INDEX_NONE OutUpperIndex is populated with the index of the first element in InArray with a Timestamp greater than InTimestamp. On error, this is set to INDEX_NONE OutAlpha is a number between 0.f and 1.f which describes the blending between the lower and upper indices. 0.f refers OutLowerIndex and 1.f to OutUpperIndex.

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