I’m writing a media player application which uses FMOD for music, and DirectShow for video and DVD playback.
Up to now I called FSOUND_Init and FSOUND_Close only once, during startup and shutdown of the app. This worked fine until I noticed that, even while my audio was paused or stopped (I even turned off the DSP unit), FMOD was still inflicting a significant CPU load. This is a problem when I’m trying to play back videos or DVDs, since the target system is of the 1Ghz mini-itx variety, and needs most of the CPU while playing back full-screen WMV.
I changed my architecture to release all FMOD resources (FSOUND_Shutdown) when going into video mode, with a corresponding re-initialization (FSOUND_Init) when coming back. Here’s where my problems started: for some reason, after calling FSOUND_Close(), I need to call FSOUND_Init() twice, since it always fails the first time (no matter how much time elapsese between the calls). Another problem I noticed is that the FSOUND_Close()/FSOUND_Init() combination seems to leak some memory (roughly 250K or so) each time. I did not do a scientific analysis on this, just glancing at the memory numbers for the app in windows task manager, which creep higher and higher.
Anyway, any help would be appreciated.. thanks!
- rknoesel asked 13 years ago
Omg… how silly of me, that’s what my problem is too (with the memory leak at least). I missed this while re-architecting for the Init()/Close() strategy. Anyway, I’ll fix this and try it out again when I get home, maybe it will take care of the double initialization problem as well.
I didn’t think that there was a memory leak in this library, everything so far had been flawless and tight.
Please login first to submit.