Ejemplo n.º 1
0
        private void StopRecord(object sender, MouseButtonEventArgs e)
        {
            string numberrecord = "";
            var    k            = from a in de.VIDEORECORDs
                                  select a;

            numberrecord = string.Format("Record{0}", k.Count() + 1);
            string desktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

            playrecord.Visibility = Visibility.Visible;
            stoprecord.Visibility = Visibility.Hidden;
            RecordAudioSystem.StopRecord();
            RecordYourVoice.StopRecord();

            ConvertFile.NAudioMp3ToWav("C:\\ShareFolderMusic\\Record\\system.mp3", "C:\\ShareFolderMusic\\Record\\tempt.wav");
            ConvertFile.MixWavFiles(new string[] { "C:\\ShareFolderMusic\\Record\\tempt.wav", "C:\\ShareFolderMusic\\Record\\voice.wav" }, string.Format("C:\\ShareFolderMusic\\Record\\{0}_{1}.wav", lbtenbaihat.Text, numberrecord));
            string output = desktop + "\\" + lbtenbaihat.Text + "_" + numberrecord + ".wav";
            string input  = "C:\\ShareFolderMusic\\Record\\" + lbtenbaihat.Text + "_" + numberrecord + ".wav";

            File.Copy(input, output);
        }