Mrwb
10-09-2003, 01:52 AM
Im trying to sync some music to some effects using FMod, but I can't get it to work. Im using FSOUND_Stream_SetSynchCallback to read RIFF markers inside the stream file. (in this case, a wav file.. ;))
Here is the C code for making it work, located in the FMod documentation:
signed char endcallback(FSOUND_STREAM *stream, void *buff, int len, int param)
{
// end of stream callback doesn't have a 'buff' value, if it doesn't it could be a synch point.
if (buff)
{
printf("\nSYNCHPOINT : \"%s\"\n", buff);
}
return TRUE;
}
I tried to do a conversion of this to delphi, but it was rather unsuccesfull.
All I need is the string value of the RIFF markers so I can do a basic IF/case of in my mainloop...
Please help me.. Thanks in advance.
Here is the C code for making it work, located in the FMod documentation:
signed char endcallback(FSOUND_STREAM *stream, void *buff, int len, int param)
{
// end of stream callback doesn't have a 'buff' value, if it doesn't it could be a synch point.
if (buff)
{
printf("\nSYNCHPOINT : \"%s\"\n", buff);
}
return TRUE;
}
I tried to do a conversion of this to delphi, but it was rather unsuccesfull.
All I need is the string value of the RIFF markers so I can do a basic IF/case of in my mainloop...
Please help me.. Thanks in advance.