0

I have got multiple files containing audio in .wav format/extension, As android is not providing us with AudioInputStream how can i copy without it, below is the list of audioFiles:

List<File> audioFiles = new Arraylist<>();
for(File file : audioFiles) {
try...

catch...
}

I have been scratching my head since long time Any help would be much Appreciated. :-)

Amanth Rai
  • 191
  • 2
  • 12
  • I wonder why you mess around with a vector and a sequence input stream. Do away with them. You iterate the arraylist and as soon as you have an input stream copy the contents to that output stream. Thats all. – blackapps May 07 '20 at 22:22
  • all right this helped me: https://stackoverflow.com/a/11452687/10435571 – Amanth Rai May 08 '20 at 05:14

1 Answers1

0

Actually OutputStream was missing a valid header so i created a helper class for writing a header for the file were all concatenated audio get written to. and this helped me for Generating header for the (.wav) file

Amanth Rai
  • 191
  • 2
  • 12
  • how did you merged multiple wav files into single one? I also trying to do same but the problem is new file only play the first file. – im07 Oct 25 '22 at 03:39
  • @Imranrana07 can u post ur code for merging wav files out here? – Amanth Rai Oct 31 '22 at 06:08