Apple did not post any alternative code for this on the Apple Developer site.
1. for this code
AudioSessionInitialize( NULL, NULL, interruptionCallback, self );
replace with
[[AVAudioSession sharedInstance] setActive:YES error:nil];
2. fro this code
UInt32 sessionCategory = kAudioSessionCategory_PlayAndRecord;
AudioSessionSetProperty(
kAudioSessionProperty_AudioCategory,
sizeof(sessionCategory),
&sessionCategory
);
replace with
UInt32 sessionCategory = kAudioSessionCategory_PlayAndRecord;
[[AVAudioSession sharedInstance]
setCategory:sessionCategory error:nil];