0
0

I have hacked up a small mp3 player app with fmod, but the memory usage is 3,3mb and it is the same if i play a 10mb or 38kb mp3 file.

[code:739rjn70]

include <stdio.h>

include "fmod.h"

FSOUND_STREAM* handle;

int main(int argc, char* argv[])
{
if(argc < 1){
return 1;
}
FSOUND_SetOutput(FSOUND_OUTPUT_DSOUND);
//init FMOD sound system
FSOUND_Init(44100, 32, 0);
//load and play sample
handle = FSOUND_Stream_Open(argv[1], 0, 0, 0);
FSOUND_Stream_Play(0, handle);

getchar();

//clean up
FSOUND_Stream_Close(handle);
FSOUND_Close();

return 0;

}
[/code:739rjn70]

I compile this source with MinGW with the following commands.
g++ -O2 -c main.cpp
g++ -s -o main main.o -lfmod

My exe file is 5120bytes.

What have i missed that could case this enormus memory usage?

  • You must to post comments
0
0

Any way i can monitor what dlls windows loads?
Yep FSOUND_GetMemoryStats tells me 204kb

  • You must to post comments
0
0

there is this nifty little program called “dependency walker” ([url:1o3rdpa4]http://www.dependencywalker.com/[/url:1o3rdpa4]) you can use which tells you what dll’s a given executable uses.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.