Sign in to follow this  
Followers 0
AcidicChip

Convert To Mp3 Via Obj Or Dll?

9 posts in this topic

I need a way to be able to convert audio formats to MP3 via Obj or DLL. I know you can use lame's EXE and do command line, etc, but that's not the route I want to go. I also know that there's a lame_enc.dll, I just don't have a CLUE on how to use it with AutoIT.

If anyone could help me out, I would greatly appreciate it.

Share this post


Link to post
Share on other sites



Search the AutoIt Manual for "dllcall"

and then read this:

http://www.fi.muni.cz/~qruzicka/Smid/man.htm

-mu

Yea, I've done that, but I get lost with the whole construct, etc. I was hoping for another solution, or a basic example of how to use lame_enc with dllcall.

Share this post


Link to post
Share on other sites

After readin that site adn some others i started workin on this. I got the first step:

$result = DllCall( "lame_enc.dll", "str", "BE_CONFIG", "str", "BE_CONFIG_LAME", "int", 1, "int", 331, "int", 44100, "int", 0, _
                    "string", "BE_MP3_MODE_JSTEREO", "int", 128, "str", "LQP_R3MIX", "str", "MPEG1", "int", 0, "int", 0, _
                    "string", "TRUE", "str", "TRUE", "int", 320, "str", "TRUE", "str", "TRUE", "str", "TRUE", "str", "TRUE", _
                    "str", "TRUE", "int", 5, "str", "TRUE", "str", "LQP_PHONE" )

this step runs succesfully and returns like it is supposed to, i start getting errors on this step:

$err = DllCall( "lame_enc.dll", "str", "beInitStream", "ptr", $beConfig, "ptr", $dwSamples, "ptr", $dwMP3Buffer, _
                "int_ptr", $hbeStream)

the problem is that $beConfig and all the variables should be passed by reference to the dll, and $err is only the success or error message, is there any way to pass by reference to the dll in autoit?


_____________________________________________________"some people live for the rules, I live for exceptions"Wallpaper Changer - Easily Change Your Windows Wallpaper

Share this post


Link to post
Share on other sites

the problem is that $beConfig and all the variables should be passed by reference to the dll, and $err is only the success or error message, is there any way to pass by reference to the dll in autoit?

I honestly don't know, I'm not too good with using DLLCall, I prefer using Objects. Thanks for posting that much, hopefully someone can help us get to the next step.

Share this post


Link to post
Share on other sites

ive got like half the dll calls working fine but i need to know how to send by reference to a dll file. Does neone know how to do this, im pretty sure i can finish this if i can figure out passing by reference.


_____________________________________________________"some people live for the rules, I live for exceptions"Wallpaper Changer - Easily Change Your Windows Wallpaper

Share this post


Link to post
Share on other sites

ive got like half the dll calls working fine but i need to know how to send by reference to a dll file. Does neone know how to do this, im pretty sure i can finish this if i can figure out passing by reference.

Any luck so far? I'm used to using COMs. DLLs are just too confusing for me, lol.

Share this post


Link to post
Share on other sites

There seems to be a few people working on this, elsewhere in the forum, too.

I'm sure it would be helpful if all concerned posted whatever code thay have got working so far.

-mu

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0