0
0

I found a memory leak using fmod CE V3.70 and higher when playing MP3.
The leak happens after closing the open stream/sample and leaves behind a 4kB hole in memory. I tested this on a iPAQ 3870 and iPAQ 5450 – same results.

I tried also all 3 different ways of memory management supported by fmod – all the same result. There is 1 more allocate then free!

V3.60 works fine – I don’t know for the versions up to V3.70

Using samples:
[code:2lfvx327]
l_pSample = FSOUND_Sample_Load(FSOUND_UNMANAGED, "Test.mp3", 0, 0, 0);

if (l_pSample == 0)
{
// do error handling
}

FSOUND_Sample_Free(l_pSample); // 4kB memory leak here
[/code:2lfvx327]

Using stream:
[code:2lfvx327]
BYTE* l_pBuffer = new BYTE[5000];

// fill the buffer with sound data

l_pStream = FSOUND_Stream_OpenFile((char *)l_pBuffer, FSOUND_LOADMEMORY | FSOUND_2D | FSOUND_NORMAL, 5000);

if (l_pStream == 0)
{
// error handling
}

FSOUND_Stream_Close(l_pStream); // memory leak 4kB
[/code:2lfvx327]

V3.60 works fine on memory, but has an disturbing delay when the MP3 is finished (at least better then leaking memory 😉 )

Please let me know when this problem will be fixed!

  • You must to post comments
0
0

Perhaps these 4kb are the bytes fmod seek for a tag/syncword, try with a wav file, if it doesn’t occure, it means that i am wrong :roll:

  • You must to post comments
0
0

Thanks for the fast update! 8)

I will check it today and will let you know the results….

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.