Reputation: 79
AudioSessionSetProperty(kAudioSessionProperty_PreferredHardwareIOBufferDuration, sizeof(bufferLength), &bufferLength);
How can I per lace this method in iOS 7??
Upvotes: 3
Views: 3405
Reputation: 170849
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.
Upvotes: 11