初始化 |
- (nullable instancetype)initWithURL:(NSURL *)url settings:(NSDictionary<NSString *, id> *)settings error:(NSError **)outError; |
|
|
- (nullable instancetype)initWithURL:(NSURL *)url format:(AVAudioFormat *)format error:(NSError **)outError API_AVAILABLE(macos(10.12), ios(10.0), watchos(4.0)) API_UNAVAILABLE(tvos); |
|
控制和配置 |
- (BOOL)prepareToRecord; |
|
|
- (BOOL)record; |
|
|
- (BOOL)recordAtTime:(NSTimeInterval)time API_AVAILABLE(macos(10.9), ios(6.0), watchos(4.0)) API_UNAVAILABLE(tvos); |
|
|
- (BOOL)recordForDuration:(NSTimeInterval) duration; |
|
|
(BOOL)recordAtTime:(NSTimeInterval)time forDuration:(NSTimeInterval) duration API_AVAILABLE(macos(10.9), ios(6.0), watchos(4.0)) API_UNAVAILABLE(tvos); |
|
|
- (void)pause; |
|
|
- (void)stop; |
|
|
- (BOOL)deleteRecording; |
|
|
delegate |
|
信息(状态)管理 |
recording |
|
|
url |
|
|
channelAssignments |
硬件通道的集合,是个数组 |
|
currentTime |
从开始录到现在的时间,单位是秒 |
|
deviceCurrentTime |
设备当前时间The time, in seconds, of the host device where the audio recorder is located. |
|
settings |
配置信息 |
|
format |
缓冲区音频格式 |
音频电平表 |
|
|
|
meteringEnabled |
开关 |
|
updateMeters |
刷新recorder所有通道的均值和峰值,获取峰值或均值前,需要调这个方法 |
|
peakPowerForChannel |
相应通道的峰值 |
|
averagePowerForChannel |
相应通道的均值 |
设置 |
|
|
|
General Audio Format Settings |
由AVAudioPlayer和AVAudioRecorder处理 |
|
Encoder Settings |
recorder的配置项 |
|
AVEncoderBitRateStrategyKey Values |
上一项中的策略里的具体 |
|
AVSampleRateConverterAlgorithmKey |
采样转化算法 |