Audio Device Switcher,用于快速切换默认音频设备的小工具

2015-03-10 21:54:35 +08:00
 Bitex

为了方便在耳机和音箱之间切换写了这样一个小工具。如果打开音频设备面板的话,需要右击音量图标 -> 点击播放设备 -> 右击一个音频设备 -> 点击设置为默认设备,麻烦得不行。写了这个小工具就只需要两次点击就好了。

UI试着仿了一下Win8/8.1几个系统的托盘图标面板(音量、操作中心、OneDrive),没有照顾到其他版本系统的界面,而且实现方式比较笨不敢保证在高分屏上面不会崩掉。

已知bug是中文的设备名会显示成问号,之后会试着修复。然后想在列表里加上代表硬件的图标,更直观一些,还有i18n。

截图

致谢

The icon of this application was adapted from icons4android.com's Sound and Audio icon pack under Creative Commons (Attribution 3.0 Unported).

This application uses AudioEndPointController under MIT License.

And great thanks to SpikeX for his great article.

开放源代码许可协议

遵循GNU General Public License v2.0协议,请参阅LICENSE.

GitHub repo

https://github.com/7bitex/Audio-Device-Switcher

下载

https://github.com/7bitex/Audio-Device-Switcher/blob/master/Release/Audio%20Device%20Switcher.exe?raw=true

5030 次点击
所在节点    分享创造
19 条回复
freefcw
2015-03-10 23:26:12 +08:00
虽然用不着,但看着不错。
a4840636
2015-03-11 00:39:25 +08:00
不知道有没有办法快速切换声道设定
或者就用这个工具,接一条多声道的HDMI,再接一条光纤,然后快速切换好了
abelyao
2015-03-11 01:20:55 +08:00
难得在 v2ex 上看到 C# 项目,支持一下
loveminds
2015-03-11 05:22:03 +08:00
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.ComponentModel.Win32Exception (0x80004005): 系统找不到指定的文件。
在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
在 System.Diagnostics.Process.Start()
在 Audio_Device_Switcher.frmPanel.GetAudioDevices()
在 Audio_Device_Switcher.frmPanel.RefreshAudioDeviceList()
在 Audio_Device_Switcher.frmPanel.frmPanel_Shown(Object sender, EventArgs e)
在 System.Windows.Forms.Form.OnShown(EventArgs e)
在 System.Windows.Forms.Form.CallShownEvent()
在 System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
在 System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
在 System.Windows.Forms.Control.InvokeMarshaledCallbacks()


************** 已加载的程序集 **************
mscorlib
程序集版本:4.0.0.0
Win32 版本:4.0.30319.34003 built by: FX45W81RTMGDR
基本代码:file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Audio Device Switcher
程序集版本:1.0.0.0
Win32 版本:1.0.0.0
基本代码:file:///C:/Windows/system32/AudioSwitcher.exe
----------------------------------------
System.Windows.Forms
程序集版本:4.0.0.0
Win32 版本:4.0.30319.33440 built by: FX45W81RTMREL
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
程序集版本:4.0.0.0
Win32 版本:4.0.30319.33440 built by: FX45W81RTMREL
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
程序集版本:4.0.0.0
Win32 版本:4.0.30319.34003 built by: FX45W81RTMGDR
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Configuration
程序集版本:4.0.0.0
Win32 版本:4.0.30319.33440 built by: FX45W81RTMREL
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
程序集版本:4.0.0.0
Win32 版本:4.0.30319.33440 built by: FX45W81RTMREL
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Windows.Forms.resources
程序集版本:4.0.0.0
Win32 版本:4.0.30319.33440 built by: FX45W81RTMREL
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
mscorlib.resources
程序集版本:4.0.0.0
Win32 版本:4.0.30319.33440 built by: FX45W81RTMREL
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------

************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。

例如:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

启用 JIT 调试后,任何未经处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。
loveminds
2015-03-11 05:31:42 +08:00
你引用了个EndPointController.exe,而Thinkpad驱动没有这个文件,故出错
Bitex
2015-03-11 08:24:13 +08:00
@loveminds Release目录里有这个文件
wusibacg
2015-03-11 08:30:28 +08:00
希望添加组合键切换功能。
Bitex
2015-03-11 08:34:29 +08:00
@loveminds 下载地址已经更新,请参阅append
Bitex
2015-03-11 08:35:04 +08:00
@wusibacg mark,之后会试着加上这个功能
shiye515
2015-03-11 10:29:29 +08:00
用着不错,支持!
sNullp
2015-03-11 10:38:33 +08:00
赞!
能设定输出位宽和采样率就完美了
Bitex
2015-03-11 11:19:03 +08:00
@sNullp 那样就复杂了。我想做的就是一个方便切换的列表,如果需要设置位宽和采样率的话之后会考虑为设备添加右键菜单,方便进入设备属性。
maxthonzx
2015-03-11 11:26:01 +08:00
支持一下 感觉以后会用得着
sNullp
2015-03-11 11:38:17 +08:00
@Bitex 呃。。可以预先存成不同的 profile 这样。。像我这样用外接 DAC 的人很需要这个。。
Bitex
2015-03-11 11:44:00 +08:00
@sNullp 呃……因为我对音频这方面没什么了解,所以我自己的需求很简单……我去了解一下,尽可能满足你的需求
loveminds
2015-03-11 16:07:47 +08:00
@Bitex 这种东西最好还是不要做成太多文件,一般都是直接丢system32
loveminds
2015-03-11 16:10:52 +08:00
@Bitex 另外我可以建议在点击设备名称的时候对应的设备发出咚响,以便于区分
maxthonzx
2015-06-27 00:52:33 +08:00
win7 x64 使用最新版v1.3 依然提示“缺少MSVCP120D.dll”
drakex
2018-10-11 15:42:25 +08:00
这个实用的小软件,我是寻找了很久才发现啊。真是相见恨晚啊~~~

希望作者以后还能继续开发啊!
1.切换设备背景是否能加深一下呢??现在看着不是很明显啊!!!
2.能添加一个启动开关,这样能让 win7 系统开机后能自动加载启动。
3.添加个设备音量条这个调起来能更加方便。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/175923

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX