Example #1
0
        private void FileDetails_Load(object sender, EventArgs e)
        {
            lblBPS.Text          = DynamicVars.wavOps.GetWaveFile.Format.BitsPerSample.ToString() + " bits/amostra";
            lblChannels.Text     = DynamicVars.wavOps.GetWaveFile.Format.Channels.ToString();
            lblFileName.Text     = FileName;
            lblMBps.Text         = DynamicVars.wavOps.GetWaveFile.Format.AverageBytesPerSec.ToString() + " B/s";
            lblSampleRate.Text   = DynamicVars.wavOps.GetWaveFile.Format.SamplesPerSec.ToString() + " Hz";
            lblSamplesCount.Text = DynamicVars.wavOps.GetWaveFile.Data.NumSamples.ToString();
            lblSize.Text         = Utils.SizeSuffix((long)DynamicVars.wavOps.GetWaveFile.Data.DataSize);

            TimeSpan time = TimeSpan.FromSeconds(DynamicVars.wavOps.GetWaveFile.GetTrackLength);
            string   str  = time.ToString(@"hh\:mm\:ss");

            lblTime.Text = str;

            wc      = new WaveControl();
            wc.Dock = DockStyle.Fill;
            splitContainer2.Panel1.Controls.Add(wc);
            wc.Read(DynamicVars.wavOps.GetWaveFile);
            wc.WaveformDrawError += Wc_WaveformDrawError;
            ThreadStart plotFFT     = new ThreadStart(PlotFFT);
            Thread      childThread = new Thread(plotFFT);

            childThread.Start();
        }
Example #2
0
 private void Trimmer_Load(object sender, EventArgs e)
 {
     graph      = new WaveControl();
     graph.Dock = DockStyle.Fill;
     tableLayoutPanel1.Controls.Add(graph, 1, 0);
     graph.Read(DynamicVars.wavOps.GetWaveFile, true);
     numericUpDown1.Maximum = DynamicVars.wavOps.GetWaveFile.GetTrackLength * 1000;
     numericUpDown2.Maximum = DynamicVars.wavOps.GetWaveFile.GetTrackLength * 1000;
 }
Example #3
0
 private void FXEditor_Load(object sender, EventArgs e)
 {
     loadSettings();
     wc      = new WaveControl();
     wc.Dock = DockStyle.Fill;
     splitContainer1.Panel2.Controls.Add(wc);
     wc.WaveformDrawError += Wc_WaveformDrawError;
     wc.Read(DynamicVars.wavOps.GetWaveFile, true);
 }
Example #4
0
 private void Wc_WaveformDrawError(object source, Exception ex)
 {
     wc.Dispose();
     wc      = new WaveControl();
     wc.Dock = DockStyle.Fill;
     splitContainer2.Panel1.Controls.Add(wc);
     wc.Read(DynamicVars.wavOps.GetWaveFile);
     wc.WaveformDrawError += Wc_WaveformDrawError;
 }
Example #5
0
 private void button2_Click(object sender, EventArgs e)
 {
     NoobAudioLib.FX.Trimmer trm = new NoobAudioLib.FX.Trimmer((int)DynamicVars.wavOps.GetWaveFile.Format.SamplesPerSec, DynamicVars.wavOps.GetWaveFile);
     trm.CutEnd((int)numericUpDown2.Value);
     graph.Dispose();
     graph      = new WaveControl();
     graph.Dock = DockStyle.Fill;
     tableLayoutPanel1.Controls.Add(graph, 1, 0);
     graph.Read(DynamicVars.wavOps.GetWaveFile, true);
 }
Example #6
0
 public void on_fxChange()
 {
     wc.Dispose();
     wc      = new WaveControl();
     wc.Dock = DockStyle.Fill;
     splitContainer1.Panel2.Controls.Add(wc);
     wc.WaveformDrawError += Wc_WaveformDrawError;;
     wc.Read(DynamicVars.wavOps.GetWaveFile, true);
     DynamicVars.mainWindow.audioProcessingOcurred();
 }
Example #7
0
 private void Wc_WaveformDrawError(object source, Exception ex)
 {
     //PoderĂ¡ ocorrer um erro ao desenhar sobre a waveform existente. Reiniciar o controlo por complete corrige esse problema
     //Este erro era produzido tendo a janela FXEditor aberta e efetuar cortes ao ficheiro de audio
     wc.Dispose();
     wc      = new WaveControl();
     wc.Dock = DockStyle.Fill;
     splitContainer1.Panel2.Controls.Add(wc);
     wc.Read(DynamicVars.wavOps.GetWaveFile, true);
     wc.WaveformDrawError += Wc_WaveformDrawError;
 }
Example #8
0
 public void ReaplyAllFX()
 {
     for (int i = 0; i < DynamicVars.wavOps.GetWaveFile.Data.ProcessedSamples.Length; i++)
     {
         DynamicVars.wavOps.GetWaveFile.Data.ProcessedSamples[i] = DynamicVars.wavOps.GetWaveFile.Data[i];
     }
     foreach (UserControl fxPanel in fxPanels)
     {
         fxPanel.Refresh();
     }
     wc.Dispose();
     wc      = new WaveControl();
     wc.Dock = DockStyle.Fill;
     splitContainer1.Panel2.Controls.Add(wc);
     wc.WaveformDrawError += Wc_WaveformDrawError;
     wc.Read(DynamicVars.wavOps.GetWaveFile, true);
 }