0
0

I know this is mainly a c community so I can probably ask this

I know how to implement Callbacks in vb.net but I can’t make heads or tails from the parameters passed back from FSOUND_STREAMCALLBACK

buff from FSOUND_Stream_Create – Pointer to the stream data buffer to write to
from FSOUND_Stream_SetEndCallback – NULL
from FSOUND_Stream_SetSyncCallback – Pointer to a string

len from FSOUND_Stream_Create – Length of buffer specified in BYTES.
from FSOUND_Stream_SetEndCallback – 0
from FSOUND_Stream_SetSyncCallback – 0

param A user data value specified from FSOUND_Stream_Create,

I tried (among other things) the below 2 declarations but the callback won’t fire at the end of the song

Public Delegate Function testcallback(ByVal buff As Integer, ByVal len As Integer, ByVal param As Integer) As Integer

Public Delegate Function testcallback(ByVal buff As inptr, ByVal len As Integer, ByVal param As Integer) As Integer

    Public Declare Function FSOUND_Stream_SetEndCallback Lib "fmod.dll" Alias "_FSOUND_Stream_SetEndCallback@12" (ByVal stream As Integer, ByVal callback As testcallback, ByVal userdata As Integer) As Byte 

I could transfer it from VB6 to .net if I only had the declaration. And I have tried the C to VB converters available but they don’t understand the declaration either.

Someone please give me a hand.

  • You must to post comments
0
0

I guess I won first prize in the “stupid Question of the week” contest.

I mixed up the FSOUND_Streamcallback with the FMUSIC system. Oh wel I implemented my own callback for the end of song in FMUSIC (as it doesn’t appear to have one. Now everything works like a charm. Sorry for your time.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.