|
Post by (X) on Apr 23, 2021 21:54:40 GMT 1
In case you didn't know, BASS.dll contains many useful sound and video related functions. It is free to use for non-commercial purposes.
I tried using it under GFA years ago and I just wasn't equipped to troubleshoot the errors I was getting.
I had better luck this time around.
Here is a BASS TEST program that I downloaded from the BASS website. It was originally written for VB5. I ported it to GFA BASIC 32 today.
It shows how one can play several sound file types simultaneously.
You can get the latest "BASS.inc.G32" file here: gb32.proboards.com/thread/341/bass-library-g32
disco_zax_2.mod (27.1 KB)
|
|
|
Post by (X) on Apr 23, 2021 21:55:32 GMT 1
Here is a wav file to round things out...
|
|
|
Post by scalion on Apr 24, 2021 11:20:49 GMT 1
Trop bon, surtout la partie mod.
|
|
|
Post by Roger Cabo on Jun 20, 2021 18:16:37 GMT 1
Hi x-man, I have a question about a parameter _Pos. The functions use _pos As Long. But using _pos As Long seems to be wrong and writes into the wrong stack addresses at any time, that can cause crashes you'll never find. In Bass is declared QWORD _pos are be 8 Bytes, but in the Demo it use only 4 Bytes as Long. I think that happen to the old VB example where Int64 never exist. www.un4seen.com/doc/#bass/BASS_ChannelBytes2Seconds.html
Further you can not really positioning a wave file when _pos is long, but you have to set as Int64.
I want to only remark this?
// Your VB demo
Function BASS_ChannelBytes2Seconds(ByVal handle As Long, ByVal _pos As Long) As Double // www.un4seen.com/doc/#bass/BASS_ChannelBytes2Seconds.html // Translates a byte position into time (seconds), based on a channel's format. °double BASS_ChannelBytes2Seconds( ° DWORD handle, ° QWORD pos °); Return BASS_ChannelBytes2Seconds64(handle, _pos, 0) End Function
|
|
|
Post by wbtcpip on Jun 20, 2021 21:02:42 GMT 1
Declare Function BASS_ChannelBytes2Seconds Lib "bass.dll" (ByVal handle As Int, ByVal pos As Large) As Double
|
|
|
Post by (X) on Jun 21, 2021 0:58:15 GMT 1
Hi x-man, I have a question about a parameter _Pos. The functions use _pos As Long. But using _pos As Long seems to be wrong and writes into the wrong stack addresses at any time, that can cause crashes you'll never find. In Bass is declared QWORD _pos are be 8 Bytes, but in the Demo it use only 4 Bytes as Long. I think that happen to the old VB example where Int64 never exist. www.un4seen.com/doc/#bass/BASS_ChannelBytes2Seconds.html
Further you can not really positioning a wave file when _pos is long, but you have to set as Int64.
I want to only remark this?
// Your VB demo
Function BASS_ChannelBytes2Seconds(ByVal handle As Long, ByVal _pos As Long) As Double // www.un4seen.com/doc/#bass/BASS_ChannelBytes2Seconds.html // Translates a byte position into time (seconds), based on a channel's format. °double BASS_ChannelBytes2Seconds( ° DWORD handle, ° QWORD pos °); Return BASS_ChannelBytes2Seconds64(handle, _pos, 0) End Function
I will take a look...
It seems this Demo was before I compiled the BASS.inc library. I should remove the BASS_Inits procedure and import the "BASS_inc" lib instead.
I will post a revised "Library Version" asap.
This library version of the "BASS Test VB 2GFA" should be better...
You can get the latest BASS.inc file here:
|
|