Use of the of the AudioMeterInformation

Sep 13, 2010 at 1:46 PM

How do I use the CoreAudioApi.AudioMeterInformation. It doesn't have a constructor, so I have no idea how to get an instance of this object. Any help would be appreciated.

Thanks!!!

Sep 16, 2010 at 11:47 AM

using NAudio.CoreAudioApi;

MMDeviceEnumerator devEnum = new MMDeviceEnumerator();
MMDevice defaultDevice = devEnum.GetDefaultAudioEndpoint(DataFlow.Render, Role.Multimedia);

string currVolume = "MasterPeakVolume : " + defaultDevice.AudioMeterInformation.MasterPeakValue.ToString();

Copied from http://stackoverflow.com/questions/2534595/get-master-sound-volume-in-c/3613699

Sep 17, 2010 at 1:59 AM
Edited Sep 17, 2010 at 1:59 AM

Thanks for the reply!!!

The MMDeviceEnumerator only works for Windows Vista or Windows 7. Is there any other way to get the information in the AudioMeterInformation object for Windows XP?

 

Thanks again!!!

Coordinator
Sep 26, 2010 at 6:52 PM

AudioMeterInformation is not available in Windows XP.

 

Sep 28, 2010 at 12:47 AM

Hello.

So, Is there any way using any other resources or combination of them in the NAudio library to get the MastePearkValue and PeakValues using components available for Windows XP?

 

Thanks for help!!!!

Coordinator
Oct 5, 2010 at 6:52 PM

I guess there must be some way, but I'm afraid I don't know what it is. You might be best off asking a question on StackOverflow

Mark