0
0

I’m currently getting very occasional crash logs from one user due to them hitting an assert I placed on the return value of:

[code:3nrbxua6]FMOD_RESULT result = FMOD_OK;

result = FMOD_EventSystem_Create(&_fmodEventSystem);
NSAssert(result == FMOD_OK, 
    @"Error creating FMOD event system (%d): %s", result, FMOD_ErrorString(result));

FMOD_IPHONE_EXTRADRIVERDATA extraDriverData = {};
extraDriverData.sessionCategory = FMOD_IPHONE_SESSIONCATEGORY_AMBIENTSOUND;
extraDriverData.forceSpeakerOutput = YES;

result = FMOD_EventSystem_Init(_fmodEventSystem, 50, FMOD_INIT_NORMAL, &extraDriverData, FMOD_EVENT_INIT_USE_GUIDS);
NSAssert(result == FMOD_OK, 
    @"Error initialising FMOD event system (%d): %s", result, FMOD_ErrorString(result));[/code:3nrbxua6]

The return code on the second assert is: [code:3nrbxua6]FMOD_ERR_OUTPUT_INIT[/code:3nrbxua6].

The user is running iOS 5.1.1 on an iPhone 4S. I’ve a couple of questions:

1) What might be causing this?
2) What kind of fallback code should I be putting in place if this happens?

Thanks in advance.

  • You must to post comments
0
0

FMOD initialization is generally pretty stable, if you are able to link with our logging version you will get much more details about what is going on. We had some troubles a while back with certain devices reporting init errors because the internal audio state was in flux. Generally closing the FMOD system and try again was sufficient to recover. If you are able to pin down a repro case for the problem I’d be happy to try it out here in the debugger.

  • You must to post comments
0
0

Thanks for the reply.

It sounds like if the first initialisation fails I need to wait a second or two and try again. I’ll put some code in to see if it gets rid of the crashes.

They are very infrequent, so it’s unlucky I could get a test case for you.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.