AndroidAudioConverter icon indicating copy to clipboard operation
AndroidAudioConverter copied to clipboard

only last file being converted from filelist

Open Ankurjain30 opened this issue 9 years ago • 1 comments

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();

Ankurjain30 avatar Nov 09 '16 14:11 Ankurjain30

because of single Thread. don't support concurrent

sunpan3213 avatar May 27 '19 01:05 sunpan3213