mixing 2 sounds from ByteArray

前端 未结 3 569
逝去的感伤
逝去的感伤 2021-01-05 17:36

I have build a mixer and save all the sequence in an array and then play it again, now I want to save the mix as an MP3, I have looked for any way to save the mix and the an

3条回答
  •  长情又很酷
    2021-01-05 17:56

    if you have uncompressed audio, you can just add up the values of individual array elements in your ByteArray's. But you also have to handle capping for max/min values (no overflows). Pretty sure there is nothing equivalent for mixing MP3s - so you might have to decode, mix, and encode to MP3 again.

提交回复
热议问题