namespace Core::AudioVectorOpsGeneric

Generic audio vector operations without optimizations.

namespace AudioVectorOpsGeneric {

// global functions

INLINE void vectorClear(float32 dst[], int numSamples);
INLINE void vectorClear(float64 dst[], int numSamples);
INLINE void vectorCopy(float32 dst[], const float32 src[], int numSamples);
INLINE void vectorCopy(float64 dst[], const float64 src[], int numSamples);

template <typename TDst, typename TSrc>
INLINE void vectorConvert(
    TDst dst[],
    const TSrc src[],
    int numSamples
);

template <typename TDst, typename TSrc>
INLINE void vectorAdd(
    TDst dst[],
    const TSrc src[],
    int numSamples
);

template <typename TDst, typename TSrc>
INLINE void vectorAddScaled(
    TDst dst[],
    const TSrc src[],
    int numSamples,
    float gain = 1.f
);

template <typename T>
INLINE void vectorRamp(
    T dst[],
    int numSamples,
    float startGain,
    float endGain,
    int maxRampSamples
);

template <typename T>
INLINE void vectorGetMin(
    T& result,
    const T src[],
    int numSamples
);

template <typename T>
INLINE void vectorGetMax(
    T& result,
    const T src[],
    int numSamples
);

template <typename T>
INLINE void vectorGetMinMax(
    T& minPeak,
    T& maxPeak,
    const T src[],
    int numSamples
);

template <typename T>
INLINE void vectorGetPeakRms(
    T& peak,
    T& rms,
    const T src[],
    int numSamples
);

} // namespace AudioVectorOpsGeneric