-
converting multiple files with dmcscriptinglib
Can you provide a brief code snippet to show how to convert multiples simultaneously with dmcscriptinglib. I a have a quad-core machine, running windows 7 32bit. I create 4 objects....
Converter dMC1 = new Converter();
Converter dMC2 = new Converter();
Converter dMC3 = new Converter();
Converter dMC4 = new Converter();
Next, I recurse through the files to be converted, an run each conversion on a separate thread.
Task.Factory.StartNew(() => ConvertMusicFile(FromFile, ToFile));
...From ConvertMusicFile() .....................
dMC1.Convert(fileFrom, fileTo, "mp3 (Lame)", "-b=" + m_BitRate, "");
............................
While 4 threads may be running simultaneously, only I file at a time is converted. It appears as though multiple threads cannot access the converter at the same time.
Thank you.
-
Re: converting multiple files with dmcscriptinglib
You could be better using the CLI object instead for multiple conversions, actually dBpoweramp does it this way.
-
Re: converting multiple files with dmcscriptinglib
I would rather use the scripting com object. Given that, can multiple files be converted simultaneously? As I stated, when I create multiple objects, and run them on multiple threads, it only converts ONE FILE AT A TIME, eventhough all threads are active. Can you provide a quick code snippet showing how to convert multiple files simultaneously using the COM object.
Thank you
-
Re: converting multiple files with dmcscriptinglib
You are creating the converter objects in the separate threads?
-
Re: converting multiple files with dmcscriptinglib
I have tried creating the converter objects globally within the class, and running the conversion on separate threads, and creating the objects within the method called by the thread factory.
-
Re: converting multiple files with dmcscriptinglib
Again. Can you provide a code snippet ( in C*blooper*) that shows how to convert multiple files simultaneously? Thank you.
-
Re: converting multiple files with dmcscriptinglib
We have never done this kind of conversion, so I am not sure it is possible.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Copyright © illustrate 2024, All rights reserved