public void SampleAdapter() { // Remove oldest sample when at capacity. if (Samples.Count == Samples.Capacity) { Samples.RemoveFromBack(); } // Add latest sample. var sample = CreateRelativeSample(); Samples.AddToFront(sample); // TODO: Automatic calibration. RaiseSampleAdded(sample); }