+ (CDAudioManager *) sharedManager
{
@synchronized(self) {
if (!sharedManager) {
if (!configured) {
//Set defaults here
configuredMode = kAMM_FxPlusMusicIfNoOtherAudio;
}
// all objects in sharedManager is setted, only backgroundMusicCompletitionSelector and backgroundMusicCompletitionListener is null
sharedManager = [[CDAudioManager alloc] init:configuredMode];
_sharedManagerState = kAMStateInitialised;//This is only really relevant when using asynchronous initialization
// EXC_BAD_ACCESS (code = 1, adress = 0xffb3b6b8)
[[NSNotificationCenter defaultCenter] postNotificationName:kCDN_AudioManagerInitialised object:nil];
}
}
return sharedManager;
}
do in my code….
SimpleAudioEngine * audioEngine = SimpleAudioEngine::sharedEngine();
audioEngine->getBackgroundMusicVolume(); // start call crash
device - IPad version 5.1
volume on device muted with button
volume value ~25%
crash is not always and only at start app , what could be the problem ?
123.png (132.3 KB)