public audio_player_with_effect_class(FFT_class _real_time_fft, Effect_3band_DRC _three_band_drc, effect_EQ _equalizer, BackgroundWorker _bgw_temp, MediaFoundationReader audioreader, int _AudioLength, int _in_total_byte_per_frame, int _Samples_per_frame) { // MessageBox.Show("new audio class"); audioreader_temp = audioreader; initPos = audioreader_temp.Position; //MessageBox.Show(initPos.ToString()); bgw_temp = _bgw_temp; sig_conv_temp = new signalconverter(audioreader_temp.WaveFormat.Channels, audioreader_temp.WaveFormat.BitsPerSample / 8); waveFormatOut = new WaveFormat(audioreader_temp.WaveFormat.SampleRate, audioreader_temp.WaveFormat.BitsPerSample, audioreader_temp.WaveFormat.Channels); in_total_byte_per_frame = _in_total_byte_per_frame; out_total_byte_per_frame = in_total_byte_per_frame; Samples_per_frame = _Samples_per_frame; bufferlen = _AudioLength; ///effect /// equalizer_temp = _equalizer; three_band_drc_temp = _three_band_drc; real_time_fft_temp = _real_time_fft; // equalizer = new effect_EQ(audioreader_temp.WaveFormat.SampleRate, Samples_per_frame, audioreader_temp.WaveFormat.Channels); }
public EQ_form(effect_EQ _equalizer) { InitializeComponent(); equalizer_temp = _equalizer; EQ_form_NFFT_length = 65536; EQ_form_sampling_rate = 48000; }
private void Form1_Load(object sender, EventArgs e) { equalizer = new effect_EQ(sampling_rate, Samples_per_frame, audio_channel); three_band_drc = new Effect_3band_DRC(); real_time_fft = new FFT_class(); //this.trackbar_playing_time = new trackbar_no_focus_cue(); textBox1.Text = (string)"please select a audio file"; Label_total_time.Text = (string)"00:00"; Label_current_time.Text = (string)"00:00"; trackbar_playing_time.Value = 0; start_playing_button.Enabled = false; Pause_button.Enabled = false; stop_button.Enabled = false; volume.Enabled = false; }