【发布时间】:2014-03-24 13:23:13
【问题描述】:
我正在尝试构建一个 dB 测量来解锁应用中的一项功能。一旦用户达到 100dB,该功能应该可用。我目前的实现只能测量到 96dB。据我了解,问题与比特率记录有某种关系:16 位只能达到 96 分贝,24 位应该能达到 144 分贝(http://www.head-fi.org/t/415361/24bit-vs-16bit-the-myth-exploded)。
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];
提前谢谢你。
【问题讨论】:
标签: ios avaudiorecorder bitrate decibel