BASS_ChannelSetPosition64

Started by Rocco,

Rocco

Hi to all,

I am having problem in using BASS_ChannelSetPosition64.
In the documentation it does not appear and I do not know how to use it.
In VB6 works fine in CustLoop project example but when I try to use it in Visual foxpro 9
I get the error "cannot find the entry point Bass_ChannelSetPosition64 in the DLL".

This is the declare in vfp: Declare long BASS_ChannelSetPosition64 IN "bass.dll" long,long,long,long
I can play music file, get bitrate and frequency but it is not possible to set the position.

Can you help me please?

Thank you.
Regards


 

Ian @ un4seen

That BASS_ChannelSetPosition64 function is a VB6-specific alias of the BASS_ChannelSetPosition function that splits the 64-bit "pos" parameter into 2x 32-bit parameters because VB6 doesn't support 64-bit integers. It's defined in the BASS.BAS file like this:

Declare Function BASS_ChannelSetPosition64 Lib "bass.dll" Alias "BASS_ChannelSetPosition" (ByVal handle As Long, ByVal pos As Long, ByVal poshigh As Long, ByVal mode As Long) As Long

And it's used in a VB6 version of BASS_ChannelSetPosition with a single 32-bit "pos" parameter like this:

Function BASS_ChannelSetPosition(ByVal handle As Long, ByVal pos As Long, ByVal mode As Long) As Long
BASS_ChannelSetPosition = BASS_ChannelSetPosition64(handle, pos, 0, mode)
End Function

I'm not familiar with Visual foxpro 9, so unfortunately I can't really offer any advice on it, but hopefully you can work something out from this info.

Rocco

Thank You very much,

VFP9 has the same problem of VB6, it can't manage int64 variable then the VB6 workaround is perfect.
What I do not understand is the meaning of the error, it seems that the function is not presente in the dll.
Anyway I try to follow exactly the VB6 example...


Ian @ un4seen

BASS_ChannelSetPosition64 is just an alias of BASS_ChannelSetPosition for VB6. When you call BASS_ChannelSetPosition64 in VB6, you're actually calling BASS_ChannelSetPosition in BASS.DLL.

Hopefully, VFP9 has an alias option too, but if not then you could just declare BASS_ChannelSetPosition with the 64-bit "pos" parameter split into 2x 32-bit parameters (note you would need to add an extra parameter to your BASS_ChannelSetPosition calls too).