예제 #1
0
 public void AddSample(Sample sample)
 {
     Samples.Add(sample);
 }
예제 #2
0
파일: Recorder.cs 프로젝트: etray/NCorder
        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);
        }