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
For example i've write this code but nothing happend :
C
#include <Bass.au3>
#include <BassConstants.au3>
$bass_dll = DllOpen("BASS.dll")
$bass_dl2 = DllOpen("Basswma.dll")
$BASS_CONFIG_WMA_ASX = 0x10102
_BASS_Init($bass_dll)
_BASS_PluginLoad($bass_dll, "basswma.dll")
_BASS_SetConfig($BASS_CONFIG_WMA_ASX, 1)
If @error Then
MsgBox(0, "Error", "Could not initialize audio")
Exit
EndIf
$file = "http://stream.transmissionfm.com:8000/breaks-high.mp3"
Dim $MusicHandle = _BASS_StreamCreateURL($file, 0, 1)
;Check if we opened the URL correctly.
If @error Then
MsgBox(0, "Error", "Could not load audio file" & @CR & "Error = " & @error)
Exit
EndIf
;Iniate playback
_BASS_ChannelPlay($MusicHandle, 1)
;endless loop
While 1
;------------------------------------------------------------------------------------------
Sleep(10);adjusting this to reduce AutoItExe crashs, 10 is optimal on my pc, i think
;------------------------------------------------------------------------------------------
WEnd
Func OnAutoItExit()
;Free Resources
MsgBox(0,"Exit",'"OnAutoItExit()" was called' & @CRLF & "Error Code: " & _BASS_ErrorGetCode())
_BASS_Free()
EndFunc;==>OnAutoItExit
Func TestFunc($buffer, $length, $user)
;---------------------------------------------------------------------------
;!!! DO NOT PUT/CHANGE/REMOVE ANYTHING IN HERE OR IT WILL BE UNSTABLE !!!!
;---------------------------------------------------------------------------
EndFunc
Alles anzeigen
Im using this bass udf , how i can fix this code to really reproduce a streaming...? What is the error? ...Thanks for help!