Hey there,

I am not new to sound engines but I am new to fmod. I was very impressed by the speed of getting it up and running playing an mp3 file. I ran into a problem though when I began using FSOUND_Stream_SetEndCallback(). Basically, my objective is to play a stream, be notified when it’s over and play another stream. So what I do is this:

1) Play an mp3 file and store the stream pointer.
2) Recieve callback when it’s finished.
3) Stop the stream, close it, and set the pointer to NULL
4) Post a windows message to play the next track.

The result is that I crash due to illegal pointer access inside fmod.dll in between frames (before my new song ever gets a chance to play).

Note: I tried removing step 3 in spite of a potential memory leak just to see if it had anything to do with itt. It didn’t. Basically, it seems as long as I am using the callback, I’m crashing.

Any suggestions would be appreciated.


  • You must to post comments

It crashes upon returning from the callback. The callback calls the associated dialog which posts a windows message to play the next track. That’s all it does and then returns 0. While walking through disassembly inside fmod.dll on return from the callback, the program crashes.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.