private static void CreateSampleFile(Sample s) { TimeSpan start = new TimeSpan(0, 0, 0, 0, Convert.ToInt32(s.SplitStartTimeFromSecond * 1000)); TimeSpan end = new TimeSpan(0, 0, 0, 0, Convert.ToInt32(s.SplitEndTimeFromSecond * 1000)); TimeSpan all = new TimeSpan(0, 0, 0, 0, Convert.ToInt32(s.AllTimeFromSecond * 1000)); SampleController sc = new SampleController(); if (s.SoundPath.ToString().Contains(".wav")) { sc.TrimWavFile(SampleController.Converter(s.SoundPath), s.SamplePath, start, all - end); } else { sc.TrimWavFile(s.SoundPath, s.SamplePath, start, all - end); } }