专业回答
#region 音量
[DllImport("winmm.dll")]
public static extern long waveOutSetVolume(UInt32 deviceID, UInt32 Volume);
[DllImport("winmm.dll")]
public static extern long waveOutGetVolume(UInt32 deviceID, out UInt32 Volume);
调用了两个windows api函数来设置音量。api函数是操作系统提供的dll调用。