I want to use FMOD into a Csharp application, to open a sound file (.wav) located into a resource file ?
So, how to use the “FSOUND_File_SetCallbacks” function from csharp/dotnet ? Where could i find some examples ?

Thanks a lot.

  • You must to post comments

You can do this using delegates (basically c#’s version of function pointers)

so you need to do something like:

public delegate IntPtr FSOUND_OPENCALLBACK (string name);
public delegate void FSOUND_CLOSECALLBACK (IntPtr handle);
public delegate int FSOUND_READCALLBACK (IntPtr buffer, int size, IntPtr handle);
public delegate int FSOUND_SEEKCALLBACK (IntPtr handle, int pos, signed char mode);
public delegate int FSOUND_TELLCALLBACK (IntPtr handle);

Then implement these delegates and pass them to FSOUND_File_SetCallbacks and it should all work

you may find this article helpful in getting things working

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.