Skip to content Skip to sidebar Skip to footer

Android Unable To Merge Two Wave Files

I am working in android. I want to merge two wave files and want to create third file. For this I create two input streams and then trying to write those input streams into one out

Solution 1:

You are not merging the data, you are simply concatenating it.

Thus you end up with one file containing:

  • WAV file header for file 1
  • audio data for file 1
  • WAV file header for file 2
  • audio data for file 2

Understandably, when someone reads this file back to play it, they see it as

  • WAV file header
  • audio data
  • some garbage data at the end of the file that they don't even get to consider.

To truly merge these files, you will need to properly consider the internal structure of the WAV files.

Post a Comment for "Android Unable To Merge Two Wave Files"