0
0

Hi

I want to know how to use the FMOD channel returned from a channel callback when the sound ends. In C# this channel is returned as an IntPtr, how do I cast this into an FMOD.Channel so that I can use it as normal e.g something like this:

[code:2j7e608n]private FMOD.RESULT soundEnded(IntPtr chan, FMOD.CHANNEL_CALLBACKTYPE cb, int cmd, uint cmd1, uint cmd2)
{
//cast the IntPtr to an fmod channel
(FMOD.Channel) chan.setPosition(0)....
}
[/code:2j7e608n]

  • You must to post comments
0
0

Try doing it like this, I’m not too familiar with the FMODEx api but it couldn’t hurt to try:

[code:31nuebah]
private FMOD.RESULT soundEnded(FMOD.Channel chan, FMOD.CHANNEL_CALLBACKTYPE cb, int cmd, uint cmd1, uint cmd2) [/code:31nuebah]

Instead of using IntPtr…

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.