|
-
November 19th, 2004, 10:40 AM
#1
Operating system volume control
I had a problem;
I want to write a code that controls the operating system sound volume. The operating system which I am working with is Win XP pro.
I tried to use:
system.setVolume() and system.getVolume(). It does not work.
Thanx
-
November 19th, 2004, 11:11 AM
#2
Re: Operating system volume control
strangely enough it doesnt!; seeing as the System class doesnt even have these methods, i dont think it will ever work either
in java, everything is categorised.. all the gui stuff goes in one package, all the io in another.. given that volume is an audio related thing (bear in mind that some systems that java runs on do not have sound cards.. i.e. washing machines) you wont find it in the base system class
i suggest you look through the JavaMedia Framework (JMF) tutorials
-
November 19th, 2004, 11:17 AM
#3
Re: Operating system volume control
 Originally Posted by alhajm
I want to write a code that controls the operating system sound volume. The operating system which I am working with is Win XP pro.
Java is designed to be platform independent, so it doesn't have OS-specific features like system volume control. The System class deals with the Java runtime environment, not the host operating system. However, the Java Sound API and the Java Media Framework (JMF) have loads of sound facilities that allow you to mess with sound in your programs.
I tried to use:
system.setVolume() and system.getVolume(). It does not work.
There are no such methods in the System class. It's worth checking the API docs to see what methods are actually available in a class.
The journey of a thousand miles starts with a single step...
Chinese proverb
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|