音量控制VB.NET [英] Volume Control VB.NET

查看:144
本文介绍了音量控制VB.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想问一个问题,我有一个应用程序,我想降低应用程序的音量而不是主音量的windows.Is无论如何做到了。

Btw我在后台播放一个wav文件。



谢谢。

解决方案

< blockquote>似乎Vista(及其他版本)中的新声音API被重写但仍具有相同的界面。这意味着旧代码仍然可以使用新的API。但是,引入的一个更改是使每个应用程序的卷更改而不是系统范围(通过主卷)。这篇文章更多地讨论了这个问题:



http://beta.codeproject.com/Articles/18520/Vista-Core-Audio-API-Master-Volume-Control [ ^ ]



看起来好像你可以通过编写代码来使用旧的界面来使用它,从而使它成为特定于应用程序的。你需要在Vista或更高版本的机器上使用它,但由于它仍然适用于XP(只是不是特定于应用程序),因此它不会是一个大问题(在我看来)。我不知道在XP中允许特定于应用程序的声音设置的任何内容。


Tim Hi,你粘贴的文章链接似乎已经死了。你能发一个新的链接吗?



http://beta.codeproject.com/Articles/18520/Vista-Core-Audio-API-Master-Volume-Control [ ^ ]



谢谢,






刚刚找到一个类似的东西的链接;



Vista Core音频API主音量控制 [ ^ ]



祝你好运,


Hello everyone,
I wanted to ask a question, I have an application and I wanted to lower the volume of only the application not master volume of windows.Is there anyway do to it.
Btw Im playing a wav file in the background.

Thanks.

解决方案

It seems as though the new sound APIs in Vista (and beyond) were rewritten but still have the same interfaces. That means that old code will still work with the new APIs. However, the one change that was introduced was to make the volume changes per-application instead of system-wide (via the master volume). Here is an article that talks more about that:

http://beta.codeproject.com/Articles/18520/Vista-Core-Audio-API-Master-Volume-Control[^]

It would seem as though you could use this to your advantage by writing your code to work to the old interface, thus making it application-specific. You would need to use it on a Vista or later machine but since it would still work on XP (just not be application-specific) it wouldn't be that big an issue (in my opinion). I don't know of anything that allows application-specific sound settings in XP.


Tim Hi, the article link that you had pasted seems to be dead. Can you please post a new link?

http://beta.codeproject.com/Articles/18520/Vista-Core-Audio-API-Master-Volume-Control[^]

Thanks,


Hi,

Just found a link that talks about something similar;

Vista Core Audio API Master Volume Control[^]

Best regards,


这篇关于音量控制VB.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆