private void SaveAs(string fileName) { AudioSaver saver = new AudioSaver(voiceRecorderState.ActiveFile); saver.TrimFromStart = PositionToTimeSpan(LeftPosition); saver.TrimFromEnd = PositionToTimeSpan(TotalWaveFormSamples - RightPosition); if (fileName.ToLower().EndsWith(".wav")) { saver.SaveFileFormat = SaveFileFormat.Wav; saver.SaveAudio(fileName); } else if (fileName.ToLower().EndsWith(".mp3")) { string lameExePath = LocateLame(); if (lameExePath != null) { saver.SaveFileFormat = SaveFileFormat.Mp3; saver.LameExePath = lameExePath; saver.SaveAudio(fileName); } } else { MessageBox.Show("Please select a supported output format"); } }
private void SaveAs(string fileName) { AudioSaver saver = new AudioSaver(voiceRecorderState.ActiveFile); saver.SaveFileFormat = SaveFileFormat.Wav; saver.AutoTuneSettings = this.voiceRecorderState.AutoTuneSettings; saver.SaveAudio(fileName); this.voiceRecorderState.EffectedFileName = fileName; DispatcherHelper.CheckBeginInvokeOnUI(() => NavigateToSaveView()); }