Displaying GUI components relating to FloatControls (Java Sound)

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Dec 2004
Posts: 27
Reputation: Frank0051 is an unknown quantity at this point 
Solved Threads: 0
Frank0051 Frank0051 is offline Offline
Light Poster

Displaying GUI components relating to FloatControls (Java Sound)

 
0
  #1
Dec 19th, 2005
I have an interesting question, I'm helping someone can help me out with this. I have been playing with the JavaSound API and I have come into contact with the FloatControls (pan and gain). Basically I know these controls only work if the line supports them.

I have been working on a media player GUI and I want to display the swing components that are related to the FloatControls. I only want to add them to the content pane if the line supports them. Now it is my understanding that you can only check if a line supports controls after it has been created and to create one you need a file to do so (maybe I'm wrong). Here is my problem, my program is letting the user select the file once the program is running, so how am I suppose to know what controls to add to the content pane if I don't have a SourceLine set up yet?
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Displaying GUI components relating to FloatControls (Java Sound)

 
0
  #2
Dec 20th, 2005
create the user interface on the fly depending on what features the stream supports.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 27
Reputation: Frank0051 is an unknown quantity at this point 
Solved Threads: 0
Frank0051 Frank0051 is offline Offline
Light Poster

Re: Displaying GUI components relating to FloatControls (Java Sound)

 
0
  #3
Dec 20th, 2005
Originally Posted by jwenting
create the user interface on the fly depending on what features the stream supports.
By on the fly do you mean right as the program starts up or after the user selects a file? If it is when the program starts up (as I wish to do), who do I instantiate the stream if a user hasn’t selected a file for the program to read in yet; do I just create a blank stream?
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Displaying GUI components relating to FloatControls (Java Sound)

 
0
  #4
Dec 21st, 2005
no, create the screen only once you know which screen features you need, so after you have the stream.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC