Reputation: 31
Greeting. I am working on the app (IOS 7) that perform some audio management and want to disable all audio preprocessing. When I do
NSError *err;
[audioSession setCategory:AVAudioSessionCategoryRecord error:&err];
[audioSession setCategory:AVAudioSessionModeMeasurement error:&err];
if (err) {
NSLog(@"Audio Session category %@ %ld %@", [err domain], (long)[err code], [[err userInfo] description]);
}
this piece of code returns
2014-04-08 00:39:12.573 okolly[2365:60b] 00:39:12.572 ERROR: [0x3b83f18c] AVAudioSessionUtilities.mm:96: getUInt32: -- Category Value Converter failed
2014-04-08 00:39:12.575 okolly[2365:60b] Audio Session category NSOSStatusErrorDomain -50 {
}
both on simulator and on device. If I comment
[audioSession setCategory:AVAudioSessionModeMeasurement error:&err];
app works as expected.
What am I doing wrong? Thank you for help.
Upvotes: 0
Views: 837
Reputation: 70673
AVAudioSessionModeMeasurement is not an AVAudioSession category property, but a mode property, as in setMode:.
Upvotes: 1