0
0

I’m receiving crash reports from some users with external audio interfaces since I had to sandbox my app for the Mac App Store.
Below is an example of a user with a ProTools HD DogiCore interface.
He also reports that other sandboxed audio apps work with the interface so I assume that there are issues with how FMOD is setup.
Form the first error (58) it looks like there is a problem with FMOD reading the list of drivers which prevents init of Fmod and sandbox crash.
Is there anything I can do on my side to prevent this issue?

[code:3lih0ch5]2/3/13 12:41:36.692 PM com.apple.SecurityServer: Session 100009 created
2/3/13 12:41:40.759 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (58) Error enumerating the available driver list. List may be inconsistent due to a recent device addition or removal.
2/3/13 12:41:40.759 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (80) A command issued was not supported by this object. Possibly a plugin without certain callbacks specified.
2/3/13 12:41:40.764 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (58) Error enumerating the available driver list. List may be inconsistent due to a recent device addition or removal.
2/3/13 12:41:40.764 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (79) This command failed because System::init or System::setDriver was not called.
2/3/13 12:41:40.764 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (36) An invalid object handle was used.
2/3/13 12:41:40.764 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (36) An invalid object handle was used.
2/3/13 12:41:40.764 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (36) An invalid object handle was used.
2/3/13 12:41:40.764 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (36) An invalid object handle was used.
2/3/13 12:41:40.764 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (79) This command failed because System::init or System::setDriver was not called.
2/3/13 12:41:40.764 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (36) An invalid object handle was used.
2/3/13 12:41:40.764 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (36) An invalid object handle was used.
2/3/13 12:41:40.764 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (36) An invalid object handle was used.
2/3/13 12:41:40.764 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (37) An invalid parameter was passed to this function.
2/3/13 12:41:40.764 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (37) An invalid parameter was passed to this function.
2/3/13 12:41:40.764 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (79) This command failed because System::init or System::setDriver was not called.
2/3/13 12:41:40.769 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (79) This command failed because System::init or System::setDriver was not called.
2/3/13 12:41:40.774 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (79) This command failed because System::init or System::setDriver was not called.
2/3/13 12:41:40.779 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (79) This command failed because System::init or System::setDriver was not called.
2/3/13 12:41:40.784 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (79) This command failed because System::init or System::setDriver was not called.
2/3/13 12:41:40.789 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (79) This command failed because System::init or System::setDriver was not called.
2/3/13 12:41:40.793 PM sandboxd: ([402]) iReal b(402) deny mach-lookup DigiCoreAudioServer
2/3/13 12:41:40.794 PM [0x0-0x2e02e].com.massimobiolcati.irealbookmac: FMOD error! (79) This command failed because System::init or System::setDriver was not called. [/code:3lih0ch5]

[code:3lih0ch5]
char exportBuffer[200] = {0};
FMOD_RESULT result = FMOD_OK;
FMOD_CREATESOUNDEXINFO soundExInfo;

result = FMOD::System_Create(&system);
ERRCHECK(result);

FMOD_SPEAKERMODE speakermode;
FMOD_CAPS        caps;

result = system->getDriverCaps(0, &caps, 0, &speakermode);
ERRCHECK(result);

result = system->setSpeakerMode(speakermode);       /* Set the user selected speaker mode. */
ERRCHECK(result);

result = system->setSoftwareFormat(44100, FMOD_SOUND_FORMAT_PCM16, 0, 1, FMOD_DSP_RESAMPLER_LINEAR); // set sample rate to 44.1kHz
ERRCHECK(result);

result = system->init(32, FMOD_INIT_NORMAL, exportBuffer);
ERRCHECK(result);

/*Allocate memory for an instance of FMOD_CREATESOUNDEXINFO*/
/*This must be done to initialize the FMOD_CREATESOUNDEXINFO before midi playback*/
memset(&soundExInfo, 0, sizeof(FMOD_CREATESOUNDEXINFO));
soundExInfo.cbsize   = sizeof(FMOD_CREATESOUNDEXINFO);
soundExInfo.minmidigranularity = granularity;

/*Specify the .dls file*/
NSString *dls_path = [[NSBundle mainBundle] pathForResource:@"jazzios" ofType:@"dls"];

soundExInfo.dlsname  = [dls_path cStringUsingEncoding:NSASCIIStringEncoding];
result = system->createSound(buffer, (FMOD_MODE)(FMOD_SOFTWARE | FMOD_2D | FMOD_CREATESTREAM), &soundExInfo, &sound);

ERRCHECK(result);

// reverb
float reverbPrefs = [[NSUserDefaults standardUserDefaults] floatForKey:kPlayerFX];
result = system->createDSPByType(FMOD_DSP_TYPE_SFXREVERB, &dspreverb);
ERRCHECK(result);
result = dspreverb->setParameter(FMOD_DSP_SFXREVERB_ROOM, reverbPrefs);
ERRCHECK(result);
result = dspreverb->setParameter(FMOD_DSP_SFXREVERB_ROOMLF, -1000.0);
ERRCHECK(result);
result = dspreverb->setParameter(FMOD_DSP_SFXREVERB_DECAYTIME, 2.0);
ERRCHECK(result);

result = system->addDSP(dspreverb, NULL);
ERRCHECK(result);

result = system->playSound(FMOD_CHANNEL_FREE, sound, 0, &channel);
ERRCHECK(result);

[/code:3lih0ch5]

  • You must to post comments
0
0

I tried to remove the code that I thought was the cause for the driver enumeration but the same problems persists:
[code:2hbxolpf] FMOD_SPEAKERMODE speakermode;
FMOD_CAPS caps;

result = system->getDriverCaps(0, &caps, 0, &speakermode);
ERRCHECK(result);

result = system->setSpeakerMode(speakermode);       /* Set the user selected speaker mode. */
ERRCHECK(result);[/code:2hbxolpf]

Any ideas?

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.