0
0

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

  • You must to post comments
0
0

Hi Acedia,

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.

-Pete

  • You must to post comments
0
0

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

[DllImport(VERSION.dll)]
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
AccessViolationException;
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.

  • You must to post comments
0
0

There are plenty of C# examples to get you started. You don’t need to do any dll imports, every API function is exposed in the C# wrapper.

You should not release the System object until you have released everything else.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.