2019-09-29 19:53:47 +00:00
|
|
|
namespace cylvester
|
|
|
|
{
|
2019-10-04 13:35:23 +00:00
|
|
|
public interface ISpectrumArrayContainer
|
2019-09-29 19:53:47 +00:00
|
|
|
{
|
|
|
|
IPdArray this[int index] { get; }
|
|
|
|
void Update();
|
|
|
|
}
|
|
|
|
|
2019-10-04 13:35:23 +00:00
|
|
|
public class SpectrumArrayContainer : ISpectrumArrayContainer
|
2019-09-29 19:53:47 +00:00
|
|
|
{
|
|
|
|
private readonly IPdArray[] arrays_;
|
|
|
|
|
2019-10-04 13:35:23 +00:00
|
|
|
public SpectrumArrayContainer()
|
2019-09-29 19:53:47 +00:00
|
|
|
{
|
|
|
|
arrays_ = new IPdArray[16];
|
|
|
|
for(var i = 0; i < 16; ++i)
|
|
|
|
arrays_[i] = new PdArray("fft_" + i, 512);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void Update()
|
|
|
|
{
|
|
|
|
foreach (var array in arrays_)
|
|
|
|
{
|
|
|
|
array.Update();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public IPdArray this[int index] => arrays_[index];
|
|
|
|
}
|
|
|
|
}
|