24 May '13 - 08:22 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: WMA Bug?!?  (Read 2043 times)
Azoth
Posts: 107


« on: 14 Jun '02 - 02:49 »
Reply with quoteQuote

BASS_WMA_ChannelSetPosition generates an error when called. Run-Time error#49 - Bad DLL calling conversion. JobNik, can you confirm the declaration:
Declare Function BASS_WMA_ChannelSetPosition Lib "basswma.dll" (ByVal handle As Long, ByVal pos As Long) As Long

Thanks.Howard.

Logged
WBSanremo
Posts: 23


« Reply #1 on: 14 Jun '02 - 03:06 »
Reply with quoteQuote

In my application BASS_WMA_ChannelSetPosition works fine....take care to pass valid value as pos  (it gave me error with negative values)

Maurizio
Logged
Azoth
Posts: 107


« Reply #2 on: 14 Jun '02 - 03:25 »
Reply with quoteQuote

WBSanremo, are you also using VB6? I'm getting the same error in my app and the WMA VB sample. Even passing 0, generates the error. Very strange.

Will double check everything.
Logged
(: JOBnik! :)
Posts: 984


« Reply #3 on: 14 Jun '02 - 03:35 »
Reply with quoteQuote

Hi Grin

I've found the BUG!!!
Ian will fix the BASSWMA v1.6 VB Declarations!!!

* The error is: BASSWMA v1.6 uses 64 bit integers to set
position/etc. VB does NOT support 64 bit, so change it to:

Declare Function BASS_WMA_ChannelSetPosition64 Lib "basswma.dll" Alias "BASS_WMA_ChannelSetPosition" (ByVal handle As Long, ByVal pos As Long, ByVal poshigh as Long) As Long

'*******************************************
' 32-bit wrappers for 64-bit BASS functions
'*******************************************
Function BASS_WMA_ChannelSetPosition (ByVal handle As Long, ByVal pos As Long) As Long
BASS_WMA_ChannelSetPosition = BASS_WMA_ChannelSetPosition64(handle,pos,0)
End Function


CooL Smiley Now it should work Grin

Have fun!

Cool JOBnik! Cool
« Last Edit: 14 Jun '02 - 04:00 by JOBnik » Logged
Azoth
Posts: 107


« Reply #4 on: 14 Jun '02 - 04:24 »
Reply with quoteQuote

Worked like a charm. I had tried changing the parameter type of pos to currency, but also failed. Just out of curiosity, Why would wrapping the function call inside of another function work??

Howard.
Logged
(: JOBnik! :)
Posts: 984


« Reply #5 on: 14 Jun '02 - 04:29 »
Reply with quoteQuote

Hi Grin
Quote

Just out of curiosity, Why would wrapping the function call inside of another function work??

Because it's better understandable that way Smiley

You could use BASS_xxx64 functions, but set the - poshigh - paramerter to - 0 - Smiley

Have fun!

Cool JOBnik! Cool
Logged
Ian @ un4seen
Administrator
Posts: 15270


« Reply #6 on: 14 Jun '02 - 10:26 »
Reply with quoteQuote

Oops Grin ... the updated BASSWMA with corrected VB API is now on the BASS page.
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines