public void Clear() { foreach (AudioSample a in audioqueue) { a.SampleOver(this); // let callers know a sample is over ad.Dispose(a.audiodata); // tell the driver to clean up a.ms?.Dispose(); // clean any stream } audioqueue.Clear(); }
private void FinishSample(AudioSample a, bool callback) { if (callback) { a.SampleOver(this); // let callers know a sample is over } a.FreeHandles(); ad.Dispose(a.audiodata); // tell the driver to clean up }