示例#1
0
        /// <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);
        }
示例#2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="filterLeft"></param>
 /// <param name="filterRight"></param>
 public StereoFilter64(IOnlineFilter64 filterLeft, IOnlineFilter64 filterRight)
 {
     _filterLeft  = filterLeft;
     _filterRight = filterRight;
 }
示例#3
0
 /// <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);
示例#4
0
 /// <summary>
 /// Add filter to the chain
 /// </summary>
 /// <param name="filter"></param>
 public void Add(IOnlineFilter64 filter) => _filters.Add(filter);