From what I can tell, it’s currently impossible to pass user data to an FMOD callback. I desperately need this functionality as I’m making a sound class that lets the user specify a specific loop count for the sound (i.e. loop 3 times then stop), and I have to be able to pass the object’s [b:1ysr4158]this[/b:1ysr4158] pointer to the callback, so it knows which object’s play count to update. Unfortunately, I can’t do this.

Also, another nice feature for FMOD to have would be loop counts. That is, you can specify through the FMOD API how many times to play through a sound before stopping (as opposed to being forced to choose between either "play once" or "loop forever"). Then I wouldn’t have to do it myself. :)

[b:1ysr4158]Edit:[/b:1ysr4158] Nevermind about request #2… I just found out from Janus that FMOD already has the "loop count" functionality. Still, I’d like to be able to pass user data directly to a callback. It’s a bit roundabout, I think, to have to assign the userdata to the channel/sound and then retrieve it in the callback function.

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.