RecordPlayerVolumeData Property |
Namespace: Alvas.Audio
private void Init() { slm = new SoundLevelMeter(); slm.Dock = DockStyle.Fill; this.Controls.Add(slm); IntPtr pcmFormat = AudioCompressionManager.GetPcmFormat(2, 16, 44100); rp.VolumeDataLength = slm.ClientSize.Width; rp.PropertyChanged += new PropertyChangedEventHandler(rp_PropertyChanged); rp.Open(new WaveReadWriter(new MemoryStream(), AudioCompressionManager.FormatBytes(pcmFormat))); rp.Record(); } SoundLevelMeter slm; RecordPlayer rp = new RecordPlayer(); void rp_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName == RecordPlayer.VolumeLevelProperty) { slm.Data = rp.VolumeData; }; }