[DllImport("winmm.dll")] public static extern int waveOutGetVolume(IntPtr hwo, out uint dwVolume); [DllImport("winmm.dll")] public static extern int waveOutSetVolume(IntPtr hwo, uint dwVolume);
int NewVolume = ((ushort.MaxValue / 10) * currentVolume); // Set the same volume for both the left and the right channels uint NewVolumeAllChannels = (((uint)NewVolume & 0x0000ffff) | ((uint)NewVolume << 16)); // Set the volume waveOutSetVolume(IntPtr.Zero, NewVolumeAllChannels);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)