PDA

View Full Version : Multiple instances of dbPowerAmp (C*/.NET)



touff-ray
01-05-2008, 02:06 PM
I am using dbPowerAmp through C*/.NET. I have a strange problem : when I want to use more than one instance of dbPowerAmp (by using multiple threads), my program fails. So my question is : is it possible to have multiple instances of dbPowerAmp running on a single computer ? And if not, how to use more than one core on a multiple core machine ?

LtData
01-05-2008, 03:08 PM
You have to run one instance of dMC per core if you have a multi-core machine.
Did you look at the example script here: http://www.dbpoweramp.com/developer/dMC-Scripting%20c%23%20.NET.txt ?

touff-ray
01-06-2008, 05:24 AM
Yes I have looked at the example script :)
Ok so I guess the error comes from my own program and not from dbPowerAmp...
Thanks for your quick answer

Spoon
01-06-2008, 09:19 AM
We have not tested multiple scripting objects in the same program, try a really simple test:

void Thread1 ()
{
DMCSCRIPTINGLib.Converter dMCs1 = new DMCSCRIPTINGLib.ConverterClass();
dMCs1.Convert("z:\\abc.ape", "z:\\new file.mp3", "mp3 (Lame)", "-b=128", "");
}

void Thread2 ()
{
DMCSCRIPTINGLib.Converter dMCs2 = new DMCSCRIPTINGLib.ConverterClass();
dMCs2.Convert("z:\\abc2.ape", "z:\\new file2.mp3", "mp3 (Lame)", "-b=128", "");
}

And start both threads at the same time.

touff-ray
01-07-2008, 08:30 AM
It works without any problem. So I guess my problem really comes from my program. Thanks very much for your help.

PS : May I ask how dbPowerAmp works with multiple cores computers ? Does it convert multiple files in parallel ?

Spoon
01-07-2008, 10:59 AM
Not through scripting, Music Converter its self spawns to converters for multi cpu systems.

touff-ray
02-20-2008, 10:17 AM
We have not tested multiple scripting objects in the same program, try a really simple test:

void Thread1 ()
{
DMCSCRIPTINGLib.Converter dMCs1 = new DMCSCRIPTINGLib.ConverterClass();
dMCs1.Convert("z:\\abc.ape", "z:\\new file.mp3", "mp3 (Lame)", "-b=128", "");
}

void Thread2 ()
{
DMCSCRIPTINGLib.Converter dMCs2 = new DMCSCRIPTINGLib.ConverterClass();
dMCs2.Convert("z:\\abc2.ape", "z:\\new file2.mp3", "mp3 (Lame)", "-b=128", "");
}

And start both threads at the same time.

Actually it does work, but in a strange way : there is only one visible instance of CoreConverter.exe and only one file is converted, then the other. (yes I am running a multi-cpu machine). How can I have two distinct instances of CoreConverter ?

Spoon
02-20-2008, 10:50 AM
You are best trying the CLI commandline method and calling CoreConverter.exe direct.

touff-ray
02-21-2008, 09:19 AM
Yes, it works much better that way. Cheers !