Jump to content
Sign in to follow this  

Code help

Recommended Posts

Hi to all, i've this code written in C :

I want to know stream's URL with the Bass.dll, This info is avaiable from _BASS_ChannelGetInfo (in the "filename" member). All work good with the mp3 streaming, but i've a problem with WMA streaming. Infact if i would know the filename of a WMA streaming it give me alway the string "m". The UN4Seen Admin give me this code, to try to fix this issue, but i don't know C :)

Can someone help me? Thanks

BASS_ChannelGetInfo(handle, &ci); // get info
if (ci.flags&BASS_UNICODE) { // the filename is Unicode
    int n=WideCharToMultiByte(CP_ACP, 0, ci.filename, -1, 0, 0, 0, 0); // get required buffer size
    char *ansi=(char*)alloca(n); // allocate a buffer
    WideCharToMultiByte(CP_ACP, 0, ci.filename, -1, ansi, n, 0, 0); // do the conversion
    // do something with "ansi" filename
} else { // the filename is ANSI
    // do something with "ci.filename"

I've not completly translated this in autoit, can anyone help me to continue?

$Info = _BASS_ChannelGetInfo($Musichandle)
If $Info[2] = $BASS_UNICODE Then
$Conversion = _WinAPI_WideCharToMultiByte($Info[7],0) 
MsgBox (0,"FileName",$Conversion)
;Do Something


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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...