I saw a few pages about it, but I found the solution to the problem, would like to join two mp3 tracks into one, but at the time he writes the output (juntos4.mp3, it is just the songs, someone can help me?
"My" Code...
FileInputStream fis1 = new FileInputStream("/sdcard/1408586436107.mp3"); // first source file
FileInputStream fis2 = new FileInputStream("/sdcard/1408586281745.mp3");//second source file
SequenceInputStream sis = new SequenceInputStream(fis1, fis2);
FileOutputStream fos = new FileOutputStream("/sdcard/juntos4.mp3");//destinationfile
int temp;
try {
while ((temp = sis.read())!= -1){
fos.write(temp);
}
fis1.close();
fis2.close();
sis.close();
fos.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}