有没有在Java中的一种方式(+ - JNA)在XP + Vista中的Windows + 7可靠地设置主系统卷? [英] Is there a way in Java (+- JNA) to set the master system volume reliably in XP+Vista+Windows 7?

查看:182
本文介绍了有没有在Java中的一种方式(+ - JNA)在XP + Vista中的Windows + 7可靠地设置主系统卷?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出现Java的API健全的工作以及单流,甚至设置从麦克风输入,但不适合在Vista中/ Windows 7中设置主音量级别。

Appears that java's sound API's work well for single streams, and even for setting the input from the microphone, but not for setting the master volume level in Vista/Windows 7.

裁判:

<一个href=\"http://stackoverflow.com/questions/1727511/java-sound-api-to-access-the-system-master-volume-control-in-vista-and-win-7\">http://stackoverflow.com/questions/1727511/java-sound-api-to-access-the-system-master-volume-control-in-vista-and-win-7

<一个href=\"http://stackoverflow.com/questions/1734808/how-to-adjust-speaker-volume-from-java-program\">http://stackoverflow.com/questions/1734808/how-to-adjust-speaker-volume-from-java-program

<一个href=\"http://stackoverflow.com/questions/294292/changing-master-volume-level/294525#294525\">http://stackoverflow.com/questions/294292/changing-master-volume-level/294525#294525
 仅适用于XP的主音量

http://stackoverflow.com/questions/294292/changing-master-volume-level/294525#294525 only works on XP for the master volume

任何人有一些会为所有这些工作(不兼容模式或控制鼠标来提高音量[机器人般])。

Anybody have something that'll work for all of them (without compatibility mode or controlling the mouse to increase volume level [robot-like]).

推荐答案

看到,因为那里看来是没有本土的解决方案,我目前的方法是使用JNA为送键盘敲击键盘音量上下:

seeing as there appears to be no native solution, my current method is to use jna to send keyboard strokes for "keyboard volume up and down":

<一个href=\"http://superuser.com/questions/82229/how-to-control-master-volume-in-windows-7/86227#86227\">http://superuser.com/questions/82229/how-to-control-master-volume-in-windows-7/86227#86227

您可能能够创建一个DLL,然后挂到它是Vista批量意识,实际上可以控制它的权利,并调用该方法,使用JNA。

You might be able to create a dll then hook into it that is "vista volume aware" and could actually control it right, and call methods on that, using jna.

FFI / JNA / JNR /雅各布(访问IAudioEndpointVolume等)可能会奏效。 (JNA出现并不真正支持COM?)FFI看起来太吓人,在这方面。

ffi/jna/jnr/jacob (to access IAudioEndpointVolume etc.) might work. (appears jna doesn't really support COM?) ffi looks scary too, in that regard.

可能可能使用Java COM桥做同样的。因此,下一个想法是尝试要么 bridj 或雅各布

Could possibly use a java COM bridge to do the same. So next thought is to try either bridj or jacob

这篇关于有没有在Java中的一种方式(+ - JNA)在XP + Vista中的Windows + 7可靠地设置主系统卷?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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