循環バッファ
Inheritance: IEnumerable
Beispiel #1
0
		public DelayMixer(params Tuple[] filters)
		{
			this.filters = filters;

			int maxDelay = int.MinValue;
			foreach(Tuple t in filters)
				if(t.delay > maxDelay) maxDelay = t.delay;
			++maxDelay;

			if(maxDelay > 0)
				this.buf = new CircularBuffer(maxDelay);

			this.Clear();
		}
Beispiel #2
0
		/// <summary>
		/// 係数の設定
		/// </summary>
		/// <param name="a">分母係数配列</param>
		/// <param name="b">分子係数配列</param>
		public void SetCoefficient(double[] a, double[]b)
		{
			if(a == null || b == null ||
				a.Length + 1 != b.Length)
			{
				this.buff = null;
				return;
			}

			if(this.buff == null)
				this.buff = new CircularBuffer(a.Length);
			else if(this.buff.Length < a.Length)
				this.buff.Resize(a.Length);

			this.a = a;
			this.b = b;
		}