illustrate
Products            Buy            Support Forum            Registrations            Professional            About           
 

Help with some VBA code?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dan_Donoghue

    • Nov 2005
    • 1

    #1

    Help with some VBA code?

    Hi Guys, I am playing around with the VB Module of DBPoweramp.

    I seem to be stuck when trying to convert to WMA. If someone could throw some hints my way it would be most appreciated.

    My code looks like this:

    Code:
        Case "MP3"
            Set Mp3Settings = CreateObject("dMCScripting.MP3Settings")
            Call Mp3Settings.Set(BitRate(X), SampleRate(X), 0, 0)
            ' Convert To MP3 (No option page, Want Overwrite page, Want finished, Want Errors)
            Call dMC.GoConversion("Mp3 (Lame)", True, False, False, False)
        Case "WMA"
            Set WMASettings = CreateObject("dMCScripting.WMASettings")
            Call WMASettings.SetWMA("Windows Media Audio 9.1", "192 kbps, 44kHz, stereo CBR", CBR)
            ' Convert To WMA (No option page, Want Overwrite page, Want finished, Want Errors)
            Call dMC.GoConversion("Windows Media Audio V9.1", True, False, False, False)
        End Select
    The MP3 part works flawlessly but the WMA one always tells me it cannot open the codec. Any ideas?

    Really appreciate the help if you can.

    Thanks

    Dan
  • xoas
    dBpoweramp Guru

    • Apr 2002
    • 2662

    #2
    Re: Help with some VBA code?

    I don't program, so I'm not sure whether these comments will help.
    It looks like your script tries to convert to wma at 44 kHz, stereo, 192 kbx cbr.
    A review of the following posts:
    http://forum.dbpoweramp.com/showthread.php?t=8849
    http://forum.dbpoweramp.com/showthread.php?t=8608
    http://forum.dbpoweramp.com/showthread.php?t=5972
    http://forum.dbpoweramp.com/showthread.php?t=1758

    strongly suggests that this is not possible with wma 9 and above.
    The earliest of these posts suggests that wma v8 may allow you to script settings but the next post suggests that you would maybe need to go back to wma v4 or so.
    In any case, if you have not already done so, you might get some ideas from these posts.

    Best wishes,
    Bill

    Comment

    Working...