This project has moved. For the latest updates, please go here.

AudioMeterInformation PeakValues problem

Aug 8, 2015 at 3:21 AM
Hi all,

I'm having a strange problem where the PeakValues are only being populated when the windows sound properties are open and the recording tab is selected. If either of these conditions aren't met, the values just don't update.

I'm using a timer (1ms) to poll AudioMeterInformation.PeakValues as such:
MMDeviceEnumerator devEnum = new MMDeviceEnumerator();
MMDevice DefaultDevice = devEnum.GetDevice(Config.GetString("VUDevice"));
In timer_tick:
volLeft = DefaultDevice.AudioMeterInformation.PeakValues[0] * 100;              
volRight = DefaultDevice.AudioMeterInformation.PeakValues[1] * 100;
Any ideas? Is there something basic I'm missing?

Thanks, Dave
Coordinator
Oct 19, 2015 at 3:46 PM
sorry, no ideas here. Might be worth reading up the MSDN documentation of the IAudioMeterInformation interface which is what NAudio is calling under the hood