/// <summary> /// Filters entire <paramref name="signal"/> by processing each signal sample in a loop. /// </summary> /// <param name="filter">Online filter</param> /// <param name="signal">Input signal</param> public static double[] FilterOnline(this IOnlineFilter64 filter, double[] signal) { var output = new double[signal.Length]; for (var i = 0; i < signal.Length; i++) { output[i] = filter.Process(signal[i]); } return(output); }
/// <summary> /// Constructor /// </summary> /// <param name="filterLeft"></param> /// <param name="filterRight"></param> public StereoFilter64(IOnlineFilter64 filterLeft, IOnlineFilter64 filterRight) { _filterLeft = filterLeft; _filterRight = filterRight; }
/// <summary> /// Insert filter at specified index into the chain /// </summary> /// <param name="idx"></param> /// <param name="filter"></param> public void Insert(int idx, IOnlineFilter64 filter) => _filters.Insert(idx, filter);
/// <summary> /// Add filter to the chain /// </summary> /// <param name="filter"></param> public void Add(IOnlineFilter64 filter) => _filters.Add(filter);