| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Sat Nov 14, 2009 5:09 am Post subject: Using BASS.Dll |
|
|
I've come to need the use of BASS.Dll. However, I'm having trouble figuring it out. I've got the Dll file, as well as BASS.Ahk.
Can someone post a code snippet that will simply play an audio file? I have:
| Code: | #Include bass.ahk
#NoEnv
#SingleInstance Force
#Persistent
BASS_Load()
BASS_Init()
File := A_ScriptDIR "\Test.mp3"
Stream := BASS_StreamCreateFile(false,file,0,0,4)
BASS_ChannelPlay(Stream,0) |
... But it fails to play the file. Maybe also a snippet of how to find the current position in the file?
Many thanks to whoever may take the time to help me out! |
|
| Back to top |
|
 |
Leef_me
Joined: 08 Apr 2009 Posts: 1158 Location: San Diego, California
|
|
| Back to top |
|
 |
Guest
|
Posted: Sun Nov 15, 2009 2:58 am Post subject: |
|
|
Lex actually pointed me in the right direction on the live chat feature.
File needed the & symbol before it (&File). Sad I didn't notice that myself. Lol.
Any ideas is BASS.Ahk or the other ones include functions that can be called to find the current position in a given created stream? |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Nov 17, 2009 6:38 am Post subject: |
|
|
| Bumpzorz! |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Nov 18, 2009 1:16 am Post subject: |
|
|
Bumpzorz!
Sry, just looking for an answer.  |
|
| Back to top |
|
 |
skwire
Joined: 18 Jan 2006 Posts: 267 Location: Conway, Arkansas
|
Posted: Fri Nov 20, 2009 4:08 am Post subject: |
|
|
Here's one way of getting the current second of a track:
| Code: | | Curr_Position := Floor( BASS_ChannelBytes2Seconds( hStream, BASS_ChannelGetPosition( hStream, 0 ) ) ) |
This is how I do it within Trout, anyway. Of course, change "hStream" to whatever variable you're using for the handle. |
|
| Back to top |
|
 |
|