// interval along x-axis double intervalX = pathX.Width / track[0].mSamples.Length; // looping throught the samples and plotting the curve for (int i = 0; i < track[0].mTrackSize; i++) { Line line = new Line(); line.X1 = line.X2 = pathX.Data.Bounds.Location.X + ((i) * intervalX); line.Y1 = pathX.Data.Bounds.Location.X + (pathY.Data.Bounds.Location.X) + (pathY.Height / 2); line.Y2 = line.Y1 + 5; polyTrack.Points.Add(new Point(line.X1, line.Y1 - track[0].mSamplesIdea * Math.Pow(10, 2))); } track[0].mSamples ---- array containing the sample points of an audio pathX ------------------------ my X-axis pathY ----------------------- my Y-axis polyTrack ------------------ a polyline contained in the canvas to which i'm binding the points and drawing the curve
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)