Radio streaming with bass.dll

  • Hi to all,
    sorry but i write in english becouse i don't know German. I also tried the autoit forum English but I had no response...im writing a radio player, in this moment i use WMP object...but is a crap :) ...i want to use a bass.dll to reproduce a radio streaming but nothing work :rofl:

    For example i've write this code but nothing happend :


    Im using this bass udf , how i can fix this code to really reproduce a streaming...? What is the error? ...Thanks for help!

  • You do not need the DLLopen-lines. Instead, you should do this:

    [autoit]

    _BASS_Startup(@ScriptDir & '\bass\BASS.dll')
    _BASS_Init(0, -1, 44100, 0)

    [/autoit]
  • I've fix this script, now i've this code :

    All work good! Now i can play a lot of file :)...But i've another question...
    How i can know the bitrate of streaming?...How i can record the streaming?

    Thanks for your preciose help!

  • I've update the bass.au3...rewritten the code


    But the playback speed is very hight!...How i can fix it?...And how i can stop stop the registration...becouse now i can only start registration, but not stop it :thumbup:

    Hi to all and thanks for help :)

    Einmal editiert, zuletzt von AuToiTarY (6. Februar 2011 um 17:02)

  • Up :)
    All now is fix...but i've another question...how i can know tha bitrate of radio streaming?...And how i can disply the format type of streaming (for example WMA,OGG, ecc...)

    Hi thanks to help!
    Up please :)

  • You can use _BASS_ChannelGetInfo to get the format:

    [autoit]

    Global Const $BASS_CTYPE_STREAM_AAC = 0x10b00
    Global Const $BASS_CTYPE_STREAM_MP4 = 0x10b01
    Global Const $BASS_CTYPE_STREAM_WMA = 0x10300
    Global Const $BASS_CTYPE_STREAM_WMA_MP3 = 0x10301

    [/autoit][autoit][/autoit][autoit]

    ...

    [/autoit][autoit][/autoit][autoit]

    $aInfo = _BASS_ChannelGetInfo($MusicHandle)

    [/autoit][autoit][/autoit][autoit]

    Switch $aInfo[3]
    Case $BASS_CTYPE_STREAM_OGG
    ConsoleWrite("Streamtype: OGG" & @CRLF)
    Case $BASS_CTYPE_STREAM_MP1
    ConsoleWrite("Streamtype: MP1" & @CRLF)
    Case $BASS_CTYPE_STREAM_MP2
    ConsoleWrite("Streamtype: MP2" & @CRLF)
    Case $BASS_CTYPE_STREAM_MP3
    ConsoleWrite("Streamtype: MP3" & @CRLF)
    Case $BASS_CTYPE_STREAM_AIFF
    ConsoleWrite("Streamtype: AIFF" & @CRLF)
    Case $BASS_CTYPE_STREAM_AAC
    ConsoleWrite("Streamtype: AAC" & @CRLF)
    Case $BASS_CTYPE_STREAM_MP4
    ConsoleWrite("Streamtype: MP4" & @CRLF)
    Case $BASS_CTYPE_STREAM_WMA
    ConsoleWrite("Streamtype: WMA" & @CRLF)
    Case $BASS_CTYPE_STREAM_WMA_MP3
    ConsoleWrite("Streamtype: WMA_MP3" & @CRLF)
    EndSwitch

    [/autoit]

    take a look at _Bass_StreamGetFilePosition to calculate the bitrate
    but it doesn´t seem to work with the bass plugin system (wma, acc, ...)
    maybe you can use BASS_WMA_GetTags!?

    E

  • Thanks all work good :)...now i can know the bitrate from all streaming source. Now another question...how i can know the streaming link of current handle?..For example i want know the streaming link of current playing radio...How i can know that with a bass.dll function?

    Thank!

  • Yep it's the simpliest way :)...and now...problem with buffer!
    I've this code...i have try to translate the delphi bass example in autoit...but something is wrong...This is the code for buffer :


    It work good with mp3 streaming...but with wma streaming it just crashed...how is possible? Why? How i can fix that?

    Hi!

    3 Mal editiert, zuletzt von AuToiTarY (15. Februar 2011 um 19:55)