Exemple #1
0
        private void StartRecording(MMDevice device, string song)
        {
            if (!string.IsNullOrEmpty(song) && device != null)
            {
                if (SoundCardRecorder != null)
                {
                    StopRecording();
                }

                SoundCardRecorder = new SoundCardRecorder(
                    device, CreateOutputFile(songLabel.Text, "wav"),
                    songLabel.Text);
                SoundCardRecorder.Start();
            }
        }
Exemple #2
0
        private void StartRecording(string song)
        {
            if (!string.IsNullOrEmpty(song))
            {
                lock (locker)
                {
                    if (SoundCardRecorder != null)
                    {
                        StopRecording();
                    }

                    var file = CreateOutputFile(songLabel.Text, "wav");

                    SoundCardRecorder = new SoundCardRecorder(
                        file,
                        songLabel.Text);
                    SoundCardRecorder.Start();

                    SoundCardRecorder.PostVolumeMeter.StreamVolume += OnPostVolumeMeter;
                }
            }
        }
Exemple #3
0
        private void StartRecording(MMDevice device, string song)
        {
            if (!string.IsNullOrEmpty(song) && device != null)
            {
                if (SoundCardRecorder != null)
                {
                    StopRecording();
                }

                CalculateCurrentFileExistCounter(song);

                if (File.Exists(CreateOutputFile(song, "mp3")) || File.Exists(CreateOutputFile(song + "_old" + fileExistCounter, "mp3")))
                {
                    File.Move(CreateOutputFile(song, "mp3"), CreateOutputFile(song + "_old" + fileExistCounter, "mp3"));
                    fileExistCounter += 1;
                }

                SoundCardRecorder = new SoundCardRecorder(
                    device, CreateOutputFile(song, "wav"),
                    songLabel.Text);
                SoundCardRecorder.Start();
            }
        }
Exemple #4
0
        private void StartRecording(MMDevice device, string song)
        {
            if (!string.IsNullOrEmpty(song) && device != null)
            {
                if(SoundCardRecorder!=null)
                    StopRecording();

                SoundCardRecorder = new SoundCardRecorder(
                                device, CreateOutputFile(songLabel.Text, "wav"),
                                songLabel.Text);
                SoundCardRecorder.Start();
            }
        }