Пример #1
0
        private void ReadWaveFile(string targetFile, int delayInMilliseconds)
        {
            labelProgress.Text = Configuration.Settings.Language.AddWaveform.GeneratingPeakFile;
            Refresh();

            using (var waveFile = new WavePeakGenerator(targetFile))
            {
                Peaks = waveFile.GeneratePeaks(delayInMilliseconds, _peakWaveFileName);

                if (Configuration.Settings.VideoControls.GenerateSpectrogram)
                {
                    labelProgress.Text = Configuration.Settings.Language.AddWaveform.GeneratingSpectrogram;
                    Refresh();
                    Spectrogram = waveFile.GenerateSpectrogram(delayInMilliseconds, _spectrogramDirectory);
                }
            }

            labelPleaseWait.Visible = false;
        }
Пример #2
0
        private void MakeWaveformAndSpectrogram(string videoFileName, string targetFile, int delayInMilliseconds)
        {
            using (var waveFile = new WavePeakGenerator(targetFile))
            {
                waveFile.GeneratePeaks(delayInMilliseconds, WavePeakGenerator.GetPeakWaveFileName(videoFileName));

                if (Configuration.Settings.VideoControls.GenerateSpectrogram)
                {
                    waveFile.GenerateSpectrogram(delayInMilliseconds, WavePeakGenerator.SpectrogramDrawer.GetSpectrogramFolder(videoFileName));
                }
            }
        }
        private void GenerateWaveformAndSpectrogram(string targetFile, double delayInMilliseconds)
        {
            using (var waveFile = new WavePeakGenerator(targetFile))
            {
                // Generate and save peak file
                _statusText = Configuration.Settings.Language.AddWaveform.GeneratingPeakFile;
                Peaks = waveFile.GeneratePeaks((int)Math.Round(delayInMilliseconds), _peakWaveFileName);

                if (Configuration.Settings.VideoControls.GenerateSpectrogram)
                {
                    _statusText = Configuration.Settings.Language.AddWaveform.GeneratingSpectrogram;
//                    Spectrogram = waveFile.GenerateSpectrogram(delayInMilliseconds, _spectrogramDirectory);
                }
            }
        }