AudioSessionSetProperty(kAudioSessionProperty_PreferredHardwareIOBufferDuration, sizeof(bufferLength), &bufferLength);
How can I per lace this method in iOS 7??
AudioSession api was deprecated in iOS7 in favor of AVAudioSession class. To replace your call you need to use setPreferredIOBufferDuration:error: method:
NSError* error;
[session setPreferredIOBufferDuration:bufferLength error:&error];
Note also that buffer duration is not the same as buffer size, buffer size should be enough to hold duration time of audio data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With