Beispiel #1
0
 public void AddSample(Sample sample)
 {
     Samples.Add(sample);
 }
Beispiel #2
0
        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);
        }