java - Get default Microphone for settings -


i not able detect default microphone volume settings on windows without using jni. tried several ways not work expected

  public static float getvolume() {         float volume = 0;         try {             if (audiosystem.islinesupported(port.info.microphone)) {                 port lineinx = (port) audiosystem.getline(port.info.microphone);                 lineinx.open();                 floatcontrol fx = null;                 control[] vx = lineinx.getcontrols();                 fx = getvolumecontrol(vx, 0);                 volume = fx.getvalue();                 lineinx.close();             }         } catch (exception ex) {         }         return volume;     } 


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -