javasound - Java sound recording and mixer settings -


i'm using javax.sound.sampled package in radio data mode decoding program. use program user feeds audio radio receiver pc's line input. user required use mixer program select line in recording input. trouble users don't know how , other programs alter recording input setting. question how can program detect if line in set recording input ? possible program change recording input setting if detects incorrect ?

thanks time.

ian

to answer first question, can check if line.info object recording input matches port.info.line_in this:

public static boolean islinein(line.info lineinfo) {     line.info[] detected = audiosystem.getsourcelineinfo(port.info.line_in);     (line.info linein : detected) {         if (linein.matches(lineinfo)) {             return true;         }     }     return false; } 

however, doesn't work operating systems or soundcard driver apis don't provide type of each available mixer channel. when test on windows works, not on linux or mac. more information , recommendations, see faq.

regarding second question, can try changing recording input settings through control class. in particular, see floatcontrol.type common settings. keep in mind availability of these controls depends on operating system , soundcard drivers, line-in detection.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -