Wednesday, October 28, 2009

How to increase sound level using C#

To increase sound level using C# first of all you should add line:

using System.Runtime.InteropServices;

to allow using COM Interop in your class.

Next we derlare two functions from an unmanaged DLL:

public static extern int waveOutGetVolume(IntPtr hwo, out uint dwVolume);

public static extern int waveOutSetVolume(IntPtr hwo, uint dwVolume);

Using these functions, we can increase or decrease the sound level of the sound card.
The following example shows how to mute the sound.

waveOutSetVolume(IntPtr.Zero, 0);

Check out калькулятор автокредита

No comments: