View Full Version : Help with some VBA code?

11-17-2005, 12:26 AM
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:

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.



11-18-2005, 06:31 AM
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:

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,