-5

Hi am not an Android Developer but I am a hybrid app developer. I have knowledge about how can create the Cordova plugin.

I want to create a plugin to merge two .wav file in Java Android. Could you please send me any example code (Java Android) on how to merge two .wav files.

Thanks in Advance

Furqan Khan
  • 528
  • 4
  • 14
Sohan
  • 1
  • Hi Sohan and welcome to Stack Overflow! You seem to be asking for someone to write some code for you. Stack Overflow is a question and answer site, not a code-writing service. Please [see here](http://stackoverflow.com/help/how-to-ask) to learn how to write effective questions. – isaaaaame Feb 12 '20 at 07:51
  • Search in SO. There are a lot of information about how to concatenate two wav files. – Dmitriy Mitiai Feb 12 '20 at 07:53

1 Answers1

1

use SequenceInputStream like this:

appendedFiles = 
                new AudioInputStream(
                        new SequenceInputStream(clip1, clip2),
                        clip1.getFormat(),
                        clip1.getFrameLength() + clip2.getFrameLength()
                        );