![](/img/trans.png)
[英]AVAudioSession's PlayAndRecord category and AVAudioSessionModeMeasurement are incompatible with defaultToSpeaker option?
[英]IOS AVAudioSessionModeMeasurement error
問候語。 我正在使用執行某些音頻管理的應用程序(IOS 7),並希望禁用所有音頻預處理。 當我做
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]);
}
這段代碼返回
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 {
}
無論是在模擬器上還是在設備上。 如果我發表評論
[audioSession setCategory:AVAudioSessionModeMeasurement error:&err];
應用程序按預期工作。
我究竟做錯了什么? 謝謝你的幫助。
與setMode:中一樣,AVAudioSessionModeMeasurement不是AVAudioSession類別屬性,而是模式屬性。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.