使用 C# 控制 Windows 10 上的左右扬声器平衡电平

Control left & right speaker balance level on Windows 10 using C#

我需要使用我的 C# 应用程序控制 Windows10 上的左右扬声器平衡级别。

我能够使用 Windows IAudioEndpointVolume interface through the Audio Manager C# wrapper which is also mentioned in 控制扬声器和麦克风的主音量级别。

但是,我仍然无法控制 L/R 余额。是否有任何特定的界面或 属性 我应该使用?

windows-audio-speaker-balance settings

我正在通过 Visual Studio15

使用 Windows 10 SDK 和 .NET 4.6.1 框架构建控制台应用程序

使用 IAudioEndpointVolume 中的 SetChannelVolumeLevel(或 SetChannelVolumeLevelScalar)方法。

SetChannelVolumeLevel: https://docs.microsoft.com/en-us/windows/desktop/api/endpointvolume/nf-endpointvolume-iaudioendpointvolume-setchannelvolumelevel

SetChannelVolumeLevelScalar: https://docs.microsoft.com/en-us/windows/desktop/api/endpointvolume/nf-endpointvolume-iaudioendpointvolume-setchannelvolumelevelscalar