获取Java中的系统音频电平 [英] Getting the system audio levels in Java
问题描述
怎样才能获得Java中的主音量?我想打一个显示程序(不会更改),该值(大概类似于构造JProgressBar
或某事)作为最大设置的百分比。我可能还需要显示当前的音量为最大可能的声级的百分比,但是这是没有必要的。
How does one get the master volume in Java? I want to make a program that displays (NOT CHANGE) this value (probably on a JProgressBar
or something similar) as a percentage of the maximum setting. I might also want to display the current sound level as a percentage of highest possible sound level, but this is not needed.
推荐答案
我不能完全肯定,但你可以看看的(的 Java媒体框架 - JMF )。你能够控制通过该库中的声音,所以我会假设你可以得到关于它的细节了。这可能仅仅是应用程序的音量,所以我可能是错的。
I am not entirely sure, but you could have a look at the (Java Media Framework - JMF). You are able to control the sound via that library, so I would assume you can get the details about it too. It might just be the application's sound level, so I might be wrong.
这篇关于获取Java中的系统音频电平的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!