0
0

I want to play midi files continually when app enters background mode.

I added below code.

 FMOD_IPHONE_EXTRADRIVERDATA extradriverdata; 
memset(&extradriverdata, 0, sizeof(FMOD_IPHONE_EXTRADRIVERDATA));
extradriverdata.sessionCategory = FMOD_IPHONE_SESSIONCATEGORY_MEDIAPLAYBACK;      
extradriverdata.forceMixWithOthers = true;

memset(&soundExInfo, 0, sizeof(FMOD_CREATESOUNDEXINFO));
soundExInfo.cbsize   = sizeof(FMOD_CREATESOUNDEXINFO);

result = system->init(32, FMOD_INIT_NORMAL | FMOD_INIT_ENABLE_PROFILE, &extradriverdata);

ERRCHECK(result);

But it does not work. Also I added in my info.plist that UIBackgroundModes’s value is audio.
To play audio using FMOD in background mode, what things do I do more?

  • You must to post comments
0
0

I successed it!
I was stupid. When I executed that code in iphone, it worked well :)

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.