BrettF Posted January 22, 2009 Author Share Posted January 22, 2009 Link is working, no problems here. It is at your end. In otherwords, there is nothing I can do. Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
youknowwho4eva Posted January 22, 2009 Share Posted January 22, 2009 I'm using 3.3.0 and I still get the same error. Giggity Link to comment Share on other sites More sharing options...
BrettF Posted January 22, 2009 Author Share Posted January 22, 2009 What version of Windows? What is the full output of SciTE? I'm not sure what else I can do... It really shouldn't fail period. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
youknowwho4eva Posted January 22, 2009 Share Posted January 22, 2009 (edited) windows xp sp3 >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\@username\Desktop\decompiler\newbass\BASS\BASS\Example 2.au3" C:\Program Files\AutoIt3\Include\Bass.au3 (404) : ==> Subscript used with non-Array variable.: Return SetError(0, "", $BASS_ret_[0]) Return SetError(0, "", $BASS_ret_^ ERROR >Exit code: 1 Time: 0.812 Edit: figured it out it wasn't returning an array because it wasn't reading the dll Edited January 22, 2009 by youknowwho4eva Giggity Link to comment Share on other sites More sharing options...
BrettF Posted January 22, 2009 Author Share Posted January 22, 2009 Try this script: Please post the contents of the SciTE console (but not all of the loops. One or two will do ) expandcollapse popup#include <..\Bass.au3> #include <..\BassConstants.au3> Global $playing_state = -1 ;Open Bass.DLL. Required for all function calls. $bass_dll = DllOpen("..\BASS.dll") _Memo ("Dll Open", $bass_dll, @error, @extended) ;Initalize bass. Required for most functions. $int = _BASS_Init($bass_dll, 0, -1, 44100, 0, "") _Memo ("Bass Init", $int, @error, @extended) ;Check if bass iniated. If not, we cannot continue. If @error Then MsgBox(0, "Error", "Could not initialize audio") Exit EndIf ;Prompt the user to select a MP3 file $file = FileOpenDialog("Open...", "", "MP3 Files (*.mp3)") _Memo ("File Open", $file, @error, @extended) ;Create a stream from that file. $MusicHandle = _BASS_StreamCreateFile($bass_dll, False, $file, 0, 0, 0) _Memo ("Stream Creation", $MusicHandle, @error, @extended) ;Check if we opened the file correctly. If @error Then MsgBox(0, "Error", "Could not load audio file" & @CR & "Error = " & @error) Exit EndIf ;Iniate playback $rettt = _BASS_ChannelPlay($bass_dll, $MusicHandle, 1) _Memo ("Play", $rettt, @error, @extended) ;Get the length of the song in bytes. $song_length = _BASS_ChannelGetLength($bass_dll, $MusicHandle, $BASS_POS_BYTE) _Memo ("Length of song", $song_length, @error, @extended) While 1 ConsoleWrite ("+> START LOOP!" & @CRLF) Sleep(20) ;Get the current position in bytes $current = _BASS_ChannelGetPosition($bass_dll, $MusicHandle, $BASS_POS_BYTE) _Memo ("Current Position", $current, @error, @extended) ;Calculate the percentage $percent = Round(($current / $song_length) * 100, 0) _Memo ("Percent", $percent, @error, @extended) ;Display that to the user ToolTip("Completed " & $percent & "%", 0, 0) ;If the song is complete, then exit. If $current >= $song_length Then ExitLoop WEnd Func OnAutoItExit() ;Free Resources _BASS_Free($bass_dll) EndFunc ;==>OnAutoItExit Func _Memo ($text, $ret, $err, $ext) ConsoleWrite ( $text & " Results: " & @CRLF & _ @TAB & "Return: " & $ret & @CRLF & _ @TAB & "Error: " & $err & @CRLF & _ @TAB & "Extended: " & $ext & @CRLF) EndFunc Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
youknowwho4eva Posted January 22, 2009 Share Posted January 22, 2009 Did you see my edit? it was my fault, I fixed it Giggity Link to comment Share on other sites More sharing options...
BrettF Posted January 22, 2009 Author Share Posted January 22, 2009 Oh great! Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Darth Posted January 22, 2009 Share Posted January 22, 2009 (edited) thanks, awesome udf. here's my edit to example one to give it a playlist and global hotkeys. the playlist is annoying to use atm and it isn't saved but I'll fix that eventually. expandcollapse popup#include <..\Bass.au3> #include <..\BassConstants.au3> #NoTrayIcon Global $playing_state = -1 ;Open Bass.DLL. Required for all function calls. $bass_dll = DllOpen("..\BASS.dll") ;Initalize bass. Required for most functions. _BASS_Init($bass_dll, 0, -1, 44100, 0, "") ;Check if bass iniated. If not, we cannot continue. If @error Then MsgBox(0, "Error", "Could not initialize audio") Exit EndIf $song_num=InputBox("Song #","howmany songs in playlist?") dim $song_array[$song_num] for $i = 0 to $song_num-1 ToolTip("Song " & $i+1 & " out of " & $song_num & ".",100,100) $song_array[$i] = FileOpenDialog("Open...", "", "MP3 Files (*.mp3)") Next ToolTip("") HotKeySet("^+=","FFWD");=========> skip to next track HotKeySet("^+-","RWND");=========> skip to previous track HotKeySet("^+p","Pause_play");===> Pause or resume track hotkeyset("^+e", "Stop");========> exit player For $i = 0 to $song_num-1 ;Create a stream from that file. $MusicHandle = _BASS_StreamCreateFile($bass_dll, False, $song_array[$i], 0, 0, 0) ;Check if we opened the file correctly. If @error Then MsgBox(0, "Error", "Could not load audio file" & @CR & "Error = " & @error) Exit EndIf ;Iniate playback _BASS_ChannelStop ($bass_dll, $MusicHandle) _BASS_ChannelPlay($bass_dll, $MusicHandle, 1) $isplay=1 ;Get the length of the song in bytes. $song_length = _BASS_ChannelGetLength($bass_dll, $MusicHandle, $BASS_POS_BYTE) While 1 Sleep(20) ;Get the current position in bytes $current = _BASS_ChannelGetPosition($bass_dll, $MusicHandle, $BASS_POS_BYTE) ;Calculate the percentage $percent = Round(($current / $song_length) * 100, 0) ;Display that to the user ToolTip("Completed " & $percent & "%", 0, 0) ;If the song is complete, then exit. If $current >= $song_length Then ExitLoop WEnd Next Func OnAutoItExit() ;Free Resources _BASS_Free($bass_dll) EndFunc ;==>OnAutoItExit Func FFWD() _BASS_ChannelStop ($bass_dll, $MusicHandle) $i = $i+1 if $i > UBound($song_array)-1 Then $i = 0 EndIf $MusicHandle = _BASS_StreamCreateFile($bass_dll, False, $song_array[$i], 0, 0, 0) _BASS_ChannelStop ($bass_dll, $MusicHandle) _BASS_ChannelPlay($bass_dll, $MusicHandle, 1) $song_length = _BASS_ChannelGetLength($bass_dll, $MusicHandle, $BASS_POS_BYTE) EndFunc func RWND() _BASS_ChannelStop ($bass_dll, $MusicHandle) $i = $i-1 if $i < 0 Then $i = UBound($song_array)-1 EndIf $MusicHandle = _BASS_StreamCreateFile($bass_dll, False, $song_array[$i], 0, 0, 0) _BASS_ChannelStop ($bass_dll, $MusicHandle) _BASS_ChannelPlay($bass_dll, $MusicHandle, 1) $song_length = _BASS_ChannelGetLength($bass_dll, $MusicHandle, $BASS_POS_BYTE) EndFunc Func Pause_Play() Switch $isplay Case 1 _BASS_Pause ($bass_dll) $isplay = 0 Case 0 _BASS_Start($bass_dll) $isplay = 1 EndSwitch EndFunc func stop() _BASS_Free($bass_dll) Exit EndFunc Edited January 22, 2009 by Darth Link to comment Share on other sites More sharing options...
koudelka Posted February 5, 2009 Share Posted February 5, 2009 the link is down !!! can anyone upload the file please Link to comment Share on other sites More sharing options...
BrettF Posted February 5, 2009 Author Share Posted February 5, 2009 http://signa5.com/downloads/BASS.zipSorry... Been doing work trying to get the downloads script to work. Obviously it still fails... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
eukalyptus Posted February 24, 2009 Share Posted February 24, 2009 using bass_fx.dll and the tempocreate function:http://www.autoitscript.com/forum/index.php?showtopic=90193 DirectSound UDF Direct2D UDF Link to comment Share on other sites More sharing options...
a440hz Posted February 24, 2009 Share Posted February 24, 2009 Excellent work BrettF and eukalyptus, thanks! I'm having loads of fun with Bass.au3. I do have a question and possibly a request. I've created a very simple surround sound mixer and am able to route the playback of 6 mono wavs to any of the channels with your fine function library. I'm wondering how I can add a few more abilities. For one, I'd like to be able control the volume of any of the 6 channels. Can I do this with BassFx or do I need BassMix? All I can find in Bass.au3 is SetVolume for the master. I do see $BASS_FX_BFX_VOLUME in BassFxConstants.au3 though, but I have no idea how to assign it to a channel. I will keep reading the examples and see if I can figure it out but any help would be greatly appreciated. I'd also like to add mute and solo for each channel as well. I think I'm really going to need to use BassMix.dll but I know when I'm over my head when trying to follow your examples and code the functions myself. My humble request would be for a BassMix.AU3 and some insight on how to use it if it appears that more multi-channel functionality could be achieved. All the best, Joe Are you experienced? Link to comment Share on other sites More sharing options...
eukalyptus Posted February 25, 2009 Share Posted February 25, 2009 Hi take a look at BASS_ChannelSetAttribute... btw.: bassmix will be the next, but first i´m going to complete bassfx (sometime) c.u. DirectSound UDF Direct2D UDF Link to comment Share on other sites More sharing options...
a440hz Posted February 25, 2009 Share Posted February 25, 2009 Thank you very much Eukalyptus! That and BASS_ATTRIB_VOL did the trick. I was able to make the individual volume sliders work as well as the mute and solo buttons! I looked in your MP3DJ app to cheat Very Cool! Now on to making some VU Meters. All the best, Joe Are you experienced? Link to comment Share on other sites More sharing options...
BrettF Posted February 27, 2009 Author Share Posted February 27, 2009 (edited) Well I've finally got back here and had time to do another translation... This one was done over the course of today, so I fear it may be slightly rushed. But netherless I've finished BassCD, which means added support for digital and analouge CD playback, as well as fixed some other stuff.BassCD with probably have some bugs in translation from VB, but oh well, please tell me.I still need to get _BASS_CD_GetInfo and _BASS_CD_GetID working properly.The download is active, direct is here:http://signa5.com/downloads/BASS.zipNext to come is either BassVideo or something else wacky and fun they have...Cheers,BrettEDIT:Just noticed something with the examples:In the example update the includes to the following:#include <..\BASSCDConstants.au3> #include <..\BASSCD.au3> #include <..\..\BASS\Bass.au3> #include <..\..\BASS\BassConstants.au3> $BASS_DLL = DllOpen ("..\..\BASS\Bass.dll") $BASS_CD_DLL = DllOpen ("..\BassCD.dll")and in BASSCD.au3;Include Constants and Bass Library #include <..\BASS\Bass.au3> #include <..\BASS\BassConstants.au3> #include <BASSCDConstants.au3>Will be updated when I finish my TODO list. Edited February 27, 2009 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
ProgAndy Posted February 27, 2009 Share Posted February 27, 2009 Hi, why don't you use Global variables for the DLL-Handles? Then the funktion calls would be a lot easier *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
BrettF Posted February 27, 2009 Author Share Posted February 27, 2009 (edited) I think I see what you mean but I'm happy with how it is EDIT: Thanks to ProgAndy, _BASSCD_GETID is working, now to make it work with freedb... Cheers, Brett Edited February 27, 2009 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
BrettF Posted February 28, 2009 Author Share Posted February 28, 2009 Updated! Download should be active soon. Version 8 +> Added the BASSCD CDPlayer example. +> Added FREEDB.org information and example /> Fixed BASS Example 2 /> Fixed Includes in BASSCD.au3 and examples /> Fixed _BASS_CD_GetID (Thanks ProgAndy) Bugs? Comments? Suggestions? Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
ProgAndy Posted February 28, 2009 Share Posted February 28, 2009 (edited) I have some CDDB-UDFs, if you want to include them. I think I see what you mean but I'm happy with how it is happy.gifOK, then it will be this way. Then i have 2 funcs for easier loding of DLLs, with checking for success. I use such funcs in all my UDFs which need DLLs, so you can react on missing DLLs. Func _BASS_LoadDLL($Path,$DLL) ; Prog@ndy If StringLen($Path) And StringRight($Path,1)<>"\" Then $Path &= "\" Local $ret = DllOpen($Path & $DLL) If Not __BASS_CheckLoadDLL($DLL) Then Return SetError(1,0,-1) EndIf Return $ret EndFunc ; internal use Func __BASS_CheckLoadDLL($DLL) ; Prog@ndy Local $ret = DllCall("kernel32.dll","ptr","GetModuleHandleW","wstr",$DLL) If @error Or $ret[0]=0 Then Return False Return True EndFuncCDDB.au3 Edited February 28, 2009 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
BrettF Posted February 28, 2009 Author Share Posted February 28, 2009 I see what you mean now, I'll work on doing the DLL tomorow after work. And thanks for the CDDB udf! Really awesome. I shall work on implementing them... Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now