アプリ内の機能のロックを解除する dB 測定を構築しようとしています。ユーザーが 100dB に達すると、この機能が利用可能になります。私の現在の実装では、最大 96dB までしか測定できません。私が理解していることから、問題はビットレートの記録に何らかの形で関連しています: 16bit は 96dB しか対応できません。神話爆発)。
dB 測定と計算は正常に機能します。私の唯一の問題は、96dB 以上を測定できないことです。より高いビットレートを達成するための設定に苦労しています。ここで何か間違っていると思います。
レコーダーの現在の初期化は次のようになります。
NSDictionary *settings = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithFloat: 44100.0], AVSampleRateKey,
[NSNumber numberWithInt: kAudioFormatAppleIMA4], AVFormatIDKey,
[NSNumber numberWithInt: 1], AVNumberOfChannelsKey,
//[NSNumber numberWithInt: 24], AVEncoderBitRateKey,
[NSNumber numberWithInt:24],AVLinearPCMBitDepthKey,
[NSNumber numberWithBool:NO],AVLinearPCMIsBigEndianKey,
[NSNumber numberWithBool:NO],AVLinearPCMIsFloatKey,
[NSNumber numberWithInt: AVAudioQualityMax], AVEncoderAudioQualityKey,
nil];
NSError *error;
recorder = [[AVAudioRecorder alloc] initWithURL:outputFileURL settings:settings error:&error];
前もって感謝します。