import javax.sound.sampled.*; import java.io.*; public class Helilindistus3{ public static void main(String argumendid[]) throws Exception{ AudioFormat formaat=new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 8000, 8, 1, 1, 8000, true); DataLine.Info info=new DataLine.Info(TargetDataLine.class, formaat); TargetDataLine sisend=(TargetDataLine)AudioSystem.getLine(info); sisend.open(formaat, sisend.getBufferSize()); sisend.start(); byte andmed[]=new byte[24000]; int baitidearv=sisend.read(andmed, 0, andmed.length); M2ngija mangija=new M2ngija(formaat, andmed); byte andmed2[]=new byte[24000]; while(true){ sisend.read(andmed2, 0, andmed2.length); for(int i=0; i