tags:

views:

26

answers:

1

Hi, I want to make program which is detecting any microphone activity from specified level. If there is any activity it set Windows master volume to specified level. When someone will stop talking it must restore previous volume in few seconds. What library I need to use? (it must work under Windows XP, Vista, 7). Thank you for your replays :)

+1  A: 

Well, there is no built-in audio library in .NET, there is however a low-level C API which can be accessed by using direct win32 calls, however I have to tell you, this API is not very pleasand and quite complicated for something as seemingly simple as setting the volume (the problem is, there are an enormous number of possible varieties of devices and controls, etc.. and the API has to enumerate things in a device independent way.)

You can read about the Vista/7 API here: Vista Audio API

There are, however, several third party .NET libraries for audio, such as NAudio that should be able to help you.

Mystere Man