Hi there.
I have opened stream with FSOUND_Stream_Open(), before that i have set new stream buffer size through FSOUND_Stream_SetBufferSize(). After that i wanna get a size of memory used by stream buffer for this call open().
[i:3qcojlbs]//For example BufferSize = 500 ms, FileName = “*.mp3”
mpStream = FSOUND_Stream_Open(FileName.c_str(), 0, 0, 0);
if (!mpStream) return false;
//GetLength() return a size of all file(url, etc.) in bytes (without any tags)
mSize = FSOUND_Stream_GetLength();
//GetLength() return a size of all file(url, etc.) in ms (without any tags :D)
mSize = FSOUND_Stream_GetLengthMs();[/i:3qcojlbs]
But i wanna know how many memory does FMOD allocate for the mpStream. How i can do it? Thanks.

  • You must to post comments

Anyway thanks, i knew it. But this ways aren’t flexible ways. In first case:
1. I must knows a depth of sample, why 16 bit? Sample may have 8 bit depth, right?
2. I must knows a number of channels, for mono=1, for stereo=2 and etc.
Second way have more flexibility. But i must keep old memory size and substract it of old memory size for each load().
May be in future FMOD will have a new methods?
unsigned long GetMemoryUsage(FSOUND_Stream);
unsigned long GetMemoryUsage(FSOUND_Sample);
I suppose that way is the most easy and flexible way to know real memory usage. 😉

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.