I\'m trying to merge mp3 audio files But not successful.
Here is my code.
public static void meargeAudio(List filesToMearge)
{
whi
Well there's a function to merge Audio or Video files
public static boolean mergeMediaFiles(boolean isAudio, String sourceFiles[], String targetFile) {
try {
String mediaKey = isAudio ? "soun" : "vide";
List listMovies = new ArrayList<>();
for (String filename : sourceFiles) {
listMovies.add(MovieCreator.build(filename));
}
List
isAudio
should be true. if you got videos isAudio
should be falsesourceFiles[]
array should contain the destinations of the media files such as
/sdcard/my_songs/audio_1, /sdcard/my_songs/audio_2, /sdcard/my_songs/audio_3
targetFile
is your final audio merged file should be somthing like
/sdcard/my_songs/final_audio_1
AsynkTask