Edit Message

Visitor Name
Subject
Message

Re: No sound

p.s. stereo -> mono only worked when I modified sound.properties with this line, which was in the output of the code below it:

javax.sound.sampled.TargetDataLine=#U0x46d0x8d7 [plughw:1,0]

Sergey I noticed you used the same line the other fellow used, but probably your mic is called something else on your system.

import javax.sound.sampled.*;

public class HelloWorld {
  public static void main( String[] args ) {
    for ( Mixer.Info info : AudioSystem.getMixerInfo() ) {
      Mixer mixer = AudioSystem.getMixer(info);
      Line.Info lineInfo = new Line.Info(DataLine.class);

      System.out.println( "Mixer " + info.getName() +
              " desc: " + info.getDescription() +
              " vend: " + info.getVendor() +
              " ver: " + info.getVersion()    );

      if ( mixer.isLineSupported( lineInfo ) ) {
    for ( Line.Info linfo : mixer.getTargetLineInfo(lineInfo) ) {
      for ( AudioFormat form : ((DataLine.Info) linfo).getFormats() )
        System.out.println( "  " + form );
    }
      }
    }
  }
}

 

good luck,

Greg