init
This commit is contained in:
commit
e58a138bea
176 files changed
+6194
No files matched your search
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using Assets.WasapiAudio.Scripts.Core;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Assets.WasapiAudio.Scripts.Unity.Transformers
|
||||
{
|
||||
[Serializable]
|
||||
public class SmoothSpectrumTransformer : SpectrumTransformer
|
||||
{
|
||||
private SpectrumSmoother _smoother;
|
||||
|
||||
[Range(1, 50)]
|
||||
public byte Iterations = 1;
|
||||
|
||||
protected override void PerformTransform(float[] input, ref float[] output)
|
||||
{
|
||||
if (_smoother == null || _smoother.SmoothingIterations != Iterations)
|
||||
{
|
||||
_smoother = new SpectrumSmoother(input.Length, Iterations);
|
||||
}
|
||||
|
||||
output = _smoother.GetSpectrumData(input);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user