How to Change Default Audio Device

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、付费专栏及课程。

余额充值