Results 1 to 1 of 1
Thread: Control volume
- 10-31-2011, 02:17 PM #1
Member
- Join Date
- Jun 2011
- Posts
- 2
- Rep Power
- 0
Control volume
Hi all,
I am fairly new at java. I need to control volume (volume up/down, mute) in a java application. I couldn't find a way to do this. I am developing on a linux system (for information).
I tired this code:
but i got execptionJava Code:Port lineIn; FloatControl volCtrl; try { mixer = AudioSystem.getMixer(null); lineIn = (Port)mixer.getLine(Port.Info.LINE_IN); lineIn.open(); volCtrl = (FloatControl) lineIn.getControl( FloatControl.Type.VOLUME); // Assuming getControl call succeeds, // we now have our LINE_IN VOLUME control. } catch (Exception e) { System.out.println("Failed trying to find LINE_IN" + " VOLUME control: exception = " + e); }Thanks for your helpFailed trying to find LINE_IN VOLUME control: exception = java.lang.IllegalArgumentException: Line unsupported: COMPACT_DISC source port
Similar Threads
-
Volume of a sphere problem
By dj_ee3 in forum New To JavaReplies: 8Last Post: 02-14-2011, 02:10 AM -
Volume of Intersection
By afifi in forum Advanced JavaReplies: 0Last Post: 01-07-2011, 10:42 AM -
javax sound set volume
By Dennis in forum Advanced JavaReplies: 0Last Post: 06-08-2010, 03:33 PM -
Volume of AudioClip
By Fedor in forum New To JavaReplies: 0Last Post: 04-25-2009, 04:16 PM -
control app width based on certain control
By thebillybobjr in forum SWT / JFaceReplies: 0Last Post: 05-15-2008, 04:52 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks