reading and writing bytes per second to generate audio file in java using I/OFileStream -


heloo! trying read bytes per second input audio wav files , write bytes data per second skipping bytes new audio wav file. question how skip bytes per second input file , writing remaining bytes data per second new audio file in java programming. have code as:- p array using classify audio file seconds.508 file size of input audio file. means if @ 10th second of audio p[q]==0, code should not read bytes @ 10th seconds. please highlight doing wrong in code? code running fine, , generating audio file size less input audio, not playing, neither can see duration.

fileinputstream in=new fileinputstream... fileoutputstream out=new fileoutputstream... int q=0; byte[] buf = new byte[44100]; int len; while (((len = in.read(buf)) > 0)&&(q<508)) {     if(p[q]==1){         out.write(buf, 0, len);      }     q++; } in.close(); out.close(); 


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -