0
0

Hey – great sound engine, but I’ve run into a possible bug on a C++ Win32 application. It seems as though an assert will trigger :

g_cFGObjects == 0
At line 5829 of e:\dx8_2\multimedia\dshow\filters\core\filgraph\filgraph\filgraph.cpp
Continue? (Cancel to debug)

This assert triggers whenever 2 or more .wma files are played as streams (the streams are played at different times, with the proper closing of the previous stream). The assert happens at termination of the program after FSOUND_Close() is called. After setting up breakpoints in possible functions where this assert might have originated, I can say that the bug exists somewhere in the fmod code – possibly in the thread shut down code???

It’s weird since it will not happen if I just play one .wma file. I have read that .wma is dealt with differently, and full implementation for .wma is yet to be finished – should I just write this bug off to that?

Thanks for the great engine!

  • You must to post comments
0
0

I believe I’ve actually found the exact bug – I’d also say it’s an fmod bug given the documentation for FSOUND_Close(). The documentation says upon FSOUND_Close(), all streams are stopped and freed…

Well it turns out, I was calling FSOUND_Stream_Stop() on my streams isntead of FSOUND_Stream_Close() when I would skip to a new .wma – the previous streams were not being freed. Well, FSOUND_Close() only frees one stream (it appears), and leaves all other streams (that were only stopped) open when it shuts down. This causes the assert from what I can tell. AND, it will not happen with .mp3’s – just .wma’s.

I was doing a poor job of managing the streams, but I suppose you might want to check this out – since the documentation implies fmod will totally clean up after you upon FSOUND_Close().

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.