public void AddSample(Sample sample) { Samples.Add(sample); }
private void SaveSample(object sender, NAudio.Wave.WaveInEventArgs e) { Sample sample = new Sample() { Id = CurrentTrack, Value = new Byte[e.BytesRecorded] }; Array.Copy(e.Buffer, sample.Value, e.BytesRecorded); this.SilenceDetected = this.IsSilent(sample.Value); this.SoundDetected = !this.SilenceDetected; this.Buffer.AddSample(sample); }