Concatenating WAV files in Java

后端 未结 3 844
一生所求
一生所求 2021-01-22 06:46

Here is my code that concatenates four wav files and produces wavAppended.wav. This concatenated file nicely plays in Windows Media Player. But through the PlaySound class, only

3条回答
  •  感动是毒
    2021-01-22 07:13

    WAV files don't work that way -- you can't just throw multiple files together (same as you can't concatenate JPEG images, for instance), as there's a header on the data, and there are multiple different formats the data may be in. I'm surprised that the file loads at all.

提交回复
热议问题