I’ve got a problem with fmod’s callback handling — or at least I think so. I’ve written a portion of code that runs fine on some computers and crashes on others as soon as a track ends.

This is how I start the first track (edited/error handling removed):

m_nBackgroundMusicMP3Channel = FSOUND_Stream_PlayEx(FSOUND_FREE, m_pBackgroundMusicMP3, NULL, TRUE);

FSOUND_SetVolume(m_TrackBuffer.m_nBackgroundMusicMP3Channel, m_nTrackVolume);

FSOUND_SetPaused(m_TrackBuffer.m_nBackgroundMusicMP3Channel, FALSE);

FSOUND_Stream_SetEndCallback(m_TrackBuffer.m_pBackgroundMusicMP3, FnTrackEndedCallback, 0);

This works fine, and I get a callback as soon as the track ends. It doesn’t matter what I do in the callback function (let’s say I just write in a return(0);) — as soon as the function is left, I get an access violation in fmod.dll.

The funny thing is, that this works on my computer, but doesn’t on some others, all of which are running W2K with similiar hardware specs.

Is there a way to find out why this happens? Perhaps some wrong initializations? Anyone who ever faced this problem?

Thanks in advance,

  • You must to post comments

Hey, I also have Access Violation errors in callback functions.
For more info about my problem : … &forum=2&4

I get the error when the mixer is set to FPU mixer, but not when it is set to a QUALITY_MMX mixer.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.