AndroidAudioConverter
AndroidAudioConverter copied to clipboard
only last file being converted from filelist
I called your method to convert files in File[] but only last file passed through method is converted to set extension. Why so? Here is the code used.
final File pathname = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/sdcard/test"); // System.out.println(pathname);
File files[] = pathname.listFiles();
for (File s : files) {
if (s.getAbsolutePath().endsWith(".wav")) {
System.out.println(s);
IConvertCallback callback = new IConvertCallback() {
@Override
public void onSuccess(File convertedFile) {
}
@Override
public void onFailure(Exception error) {
}
};
AndroidAudioConverter.with(this)
.setFile(s)
.setFormat(AudioFormat.MP3)
.setCallback(callback)
.convert();
because of single Thread. don't support concurrent