After close and stop sound, FMOD failed to initialise again by "FMOD::System_Create(&system)"

After close and stop sound when we quickly initialising FMOD again by using “FMOD::System_Create(&system)”, it gives an error “FMOD_ERR_MEMORY”.

Can you please look into this issue and let me know what is going wrong?


FMOD_ERR_MEMORY means not enough memory or resources. In the context of FMOD::System_Create, this error arises if you have run out of physical memory or if you have more than 8 system objects. If you are calling System_Create multiple times then I suspect it’s because you have more than 8 system objects, but on a memory constrained environment such as mobile it’s feasible you could be running out of physical memory.
Are you calling release() on your system objects before attempting to create new systems with FMOD::System_Create?
If you could please provide me with your FMOD version and a reproduction or code sample of what you are doing when the error occurs then I can look into the issue further.

Hi, I am sharing some piece of code below, some time it work and return “FMOD_OK” but when I am quick start sound again after shut down, it doesn’t work.
One more thing I want to add that “releaseSound” and “releaseSystem” doesn’t effect result at all.

 Create a System object and initialize.

[self releaseSound];
[self releaseSystem];
    result = FMOD::System_Create(&system); //This line return “FMOD_ERR_MEMORY”
     if (result == FMOD_OK){

  result = system->getVersion(&version);

FMOD_VERSION 0x00020010


Thank you for the additional information. I haven’t been able to reproduce any errors by emulating your example, can you please include your method definitions for releaseSound and releaseSystem?
One other thing I am curious about- why do you need to release and create a new System object here? Can you continue to use the existing System object without releasing it and immediately creating a new one?

-(void)releaseSound {
        result = sound->release();
        sound = 0;

-(void)releaseSystem {
        result = system->close();
        result = system->release();

Above is the whole code for releaseSound and releaseSystem functions.

I need to create new system here to play set and play sound again after shut down and close.

Am I doing something wrong here?

Are you creating a new system every time you play a sound? I am just trying to think of why you would need to release the system and then create a new one instead of storing it for the lifetime of the application and releasing it just before the application closes.
Have you tried adding a short call to sleepForTimeInterval before calling FMOD::System_Create and seeing if that affects the result?