Alright i have the engine working, and was stable till i ran into a quite major problem, I’m making a music game, and well, along with a music game, i need to be able to play a song, or multiple songs, multiple times. I have run into an issue where as I can play songs, and add dsp effects, etc. However if i play the song(s) about 15 times, or if i call
result = FMOD.Factory.System_Create(ref system);
15 times, i run into this error, now i have waited 30 seconds inbetween changing songs, 45 seconds, i’ve even waited 2 minutes per song for 15 times, but it always seem that on the 16th time, it throws this Err_Memory_CantPoint. I have had it tested on other machines, and sometimes it lasts for 3 songs, and some for 7, its never consistant, and i cannot narrow it down to the reason why.
I’m running Vista 64, using Fmodex 4.27.08
- Acedia asked 7 years ago
It’s strange to get ERR_MEMORY_CANTPOINT error message in the situation. It’s possible that the error enumerations aren’t matching up and your problem is really ERR_MEMORY.
[quote:3rt3xh2a]sometimes it lasts for 3 songs, and some for 7, its never consistant[/quote:3rt3xh2a]
This does sound like you’re running out of memory. The default behaviour for System::createSound is to decompress the entire song into memory and hold it there until you call Sound::release(). This takes up a lot of memory for songs because they’re usually quite long compared to sound effects. You should try loading them as streams instead which will cause FMOD to only read a little bit at a time.
To make a stream add the CREATESTREAM flag to the MODE bits in System::createStream.
the result that it returns is Err_Memory_CantPoint, this is immediately after a call to the Factory.System_Create. I’m assuming that it has alot to do with the memory, however there is no way to release the information in memory through c#. I’m assuming that i can add a function into the FMOD.cs file Somthing like
private static extern RESULT FMOD_Sound_Release(ref IntPtr sound);
[EDIT] alright i have gone through the c++ samples, and have noticed that they do infact use FMOD_Sound_Release(sound), however when attempting to do this from c# code, i get an
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
am i missing something, should i release the System first, before releasing the sounds… i’m quite confussed.
- Acedia answered 7 years ago
Please login first to submit.