title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Multiple instances of dbPowerAmp (C#/.NET)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • touff-ray
    • Apr 2007
    • 36

    Multiple instances of dbPowerAmp (C#/.NET)

    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
    dBpoweramp Guru
    • May 2004
    • 8288

    #2
    Re: Multiple instances of dbPowerAmp (C#/.NET)

    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/...%23%20.NET.txt ?

    Comment

    • touff-ray
      • Apr 2007
      • 36

      #3
      Re: Multiple instances of dbPowerAmp (C#/.NET)

      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

      Comment

      • Spoon
        Administrator
        • Apr 2002
        • 43930

        #4
        Re: Multiple instances of dbPowerAmp (C#/.NET)

        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.
        Spoon
        www.dbpoweramp.com

        Comment

        • touff-ray
          • Apr 2007
          • 36

          #5
          Re: Multiple instances of dbPowerAmp (C#/.NET)

          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 ?

          Comment

          • Spoon
            Administrator
            • Apr 2002
            • 43930

            #6
            Re: Multiple instances of dbPowerAmp (C#/.NET)

            Not through scripting, Music Converter its self spawns to converters for multi cpu systems.
            Spoon
            www.dbpoweramp.com

            Comment

            • touff-ray
              • Apr 2007
              • 36

              #7
              Re: Multiple instances of dbPowerAmp (C#/.NET)

              Originally posted by Spoon
              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 ?

              Comment

              • Spoon
                Administrator
                • Apr 2002
                • 43930

                #8
                Re: Multiple instances of dbPowerAmp (C#/.NET)

                You are best trying the CLI commandline method and calling CoreConverter.exe direct.
                Spoon
                www.dbpoweramp.com

                Comment

                • touff-ray
                  • Apr 2007
                  • 36

                  #9
                  Re: Multiple instances of dbPowerAmp (C#/.NET)

                  Yes, it works much better that way. Cheers !

                  Comment

                  Working...

                  ]]>