java - How to get dataline to mic and record get samples in android -
i trying microphone info line on android phone , sound in byte buffer using particular sampling period. coded in java using targetdataline. shows error when working android. there way or can utilize targetdataline in android? give thanks you!
private void captureaudio(){ try{ audioformat = getaudioformat(); dataline.info datalineinfo =new dataline.info(targetdataline.class,audioformat); targetdataline = (targetdataline)audiosystem.getline(datalineinfo); targetdataline.open(audioformat); targetdataline.start(); thread capturethread =new thread(new capturethread()); capturethread.start(); } grab (exception e) { system.out.println(e); system.exit(0); }//end grab }//end captureaudio method *
java android
No comments:
Post a Comment