Mach1 Spatial SDK
Loading...
Searching...
No Matches
M1DSPUtilities.h
1// Mach1 Spatial SDK
2// Copyright © 2017-2021 Mach1. All rights reserved.
3
4#pragma once
5
6#include <math.h>
7#include <vector>
8
9namespace M1DSP {
10namespace Utilities {
11/*
12 Mach1 Spatial Downmix Checker
13
14 Description:
15 This class contains tools to compare difference of signal between top and bottom of soundfield.
16 If soundfield top/bottom difference is less than the input correlation threshold the soundfield
17 will be safely downmixed to the lowest Mach1 format.
18
19 `threshold` value range = 0.0f [0% signal difference] -> 1.0f [100% signal difference]
20 */
21
23 std::vector<float> sumSample;
24 float threshold;
25 int totalSamples;
26
27 public:
28 void Setup(float threshold = 0.1);
29 void ProcessBuffer(float **buffer, int bufferSize);
30 std::vector<float> getAvgSamplesDiff();
31 bool bShouldDownmix();
32};
33} // namespace Utilities
34} // namespace M1DSP
Definition M1DSPUtilities.h:22