How to Change Default Audio Device

本文介绍了Microsoft对于默认音频播放/录制设备的哲学观点,并提供了一种技术上正确的设置方法,尤其是在Windows 98及更高版本中。此外还讨论了一个未公开的函数SetDefaultAudioEndpoint在Vista中的使用。最后提到了一个开源项目Rainmeter,它包含了一个子项目用于演示如何通过mmdeviceapi.dll设置默认音频设备。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I quoted much contents from some posted spreaded in the coner of internet, but did organize them a little. You can find all references inside the body :-)

 

The Microsoft philosophy regarding default audio playback/record is that it should not be changed progmatically by user applications.

 

Technically the correct method of setting the default audio device in OS >= Win98 would be using the SetupAPI Functions when the audio device is installed using the SetupPreferredAudioDevices keyword in the driver INF file. This is the only fully documented method I am aware of.

 

Microsoft Vista has an undocumented function in mmdeviceapi.dll exported as SetDefaultAudioEndpoint which could be used to set the default audio device. But once again it is not intended for use.

 

Fortunately I found an open-source project on Google Code, Rainmeter, which contains source code example of how to get routines from mmdeviceapi.dll and achieve the goal of setting default audio device. It's a sub-project in folder Plugins/PluginWin7Audio.

 

Rainmeter Homepage: http://code.google.com/p/rainmeter

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值