示例#1
0
        private void inputStream_Sample(object sender, SampleEventArgs e)
        {
            visualizer.Add(e.Left, e.Right);
            long repeatStartPosition = (long)((SelectionBegin.TotalSeconds / this.activeStream.TotalTime.TotalSeconds) * this.activeStream.Length);
            long repeatStopPosition  = (long)((SelectionEnd.TotalSeconds / this.activeStream.TotalTime.TotalSeconds) * this.activeStream.Length);

            if (((SelectionEnd - SelectionBegin) >= TimeSpan.FromMilliseconds(200)) && this.activeStream.Position >= repeatStopPosition) // 200 = repeatthreshhold
            {
                visualizer.Clear();
                this.activeStream.Position = repeatStartPosition;
            }
        }
示例#2
0
 private void waveStream_Sample(object sender, SampleEventArgs e)
 {
     waveFormVisualizer.Add(e.Left, e.Right);
 }