0
0

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
0
0

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

so you need to do something like:

[code:13thzaht]
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);
[/code:13thzaht]

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
[url:13thzaht]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp09192002.asp[/url:13thzaht]

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.