本文介绍了Windows XP中 - 在编程静音/取消静音音频在Python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的机器有两个音频输入:在我使用的游戏麦克风,并在我使用的吉他线。当使用一个很重要的其他静音以消除嘶嘶声/静态的,所以我希望能写一个小脚本,将触发哪一个是静音(这是相当不方便通过托盘图标,单击切换到我的输入设备,静音和取消静音)。

My machine has two audio inputs: a mic in that I use for gaming, and a line in that I use for guitar. When using one it's important that the other be muted to remove hiss/static, so I was hoping to write a small script that would toggle which one was muted (it's fairly inconvenient to click through the tray icon, switch to my input device, mute and unmute).

我想也许我可以做到这一点,但everything我可以似乎专门介绍如何设置输出音量,而不是投入,我没有足够的Win32熟悉,甚至不知道到哪里寻找更好的信息。

I thought perhaps I could do this with pywin32, but everything I could find seemed specific to setting the output volume rather than input, and I'm not familiar enough with win32 to even know where to look for better info.

可能有人点我在正确的方向?

Could anybody point me in the right direction?

推荐答案

我也有类似的问题,无法弄清楚如何使用Windows API的做我想要的。最后我只是用自动化的的AutoIt GUI。我认为这将是最快和最简单的解决方案(尽管是哈克之一)。正如我今天早些时候,你可以在Python中使用AutoIt的距离。

I had a similar problem and couldn't figure out how to use Windows API's to do what I wanted. I ended up just automating the GUI with AutoIt. I think that will be the fastest and easiest solution (albeit a "hacky" one). As I answered earlier today, you can use AutoIT from within Python.

这篇关于Windows XP中 - 在编程静音/取消静音音频在Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 20:51