KSYDummyAudioSource Class Reference
Inherits from | NSObject |
---|---|
Declared in | KSYDummyAudioSource.h |
– initWithAudioFmt:
构造函数
- (id)initWithAudioFmt:(AudioStreamBasicDescription)asbd
Parameters
asbd |
输入的音频格式 |
---|
Return Value
新实例
Declared In
KSYDummyAudioSource.h
– start
启动产生数据
- (BOOL)start
Return Value
是否启动成功
Discussion
自动生成系统时间戳
Declared In
KSYDummyAudioSource.h
– startAt:
启动产生数据
- (BOOL)startAt:(CMTime)initPts
Parameters
initPts |
设置启动时间戳 |
---|
Return Value
是否启动采集成功
Discussion
内部都会先将时间戳的timescale转为ns
Declared In
KSYDummyAudioSource.h
audioProcessingCallback
静音音频数据输出回调函数
@property (nonatomic, copy) void ( ^ ) ( CMSampleBufferRef sampleBuffer ) audioProcessingCallback
Discussion
sampleBuffer 生成的音频数据
Declared In
KSYDummyAudioSource.h
asbd
format description for audio data 默认PCM格式为: (Float32), 单声道, 44100Hz
@property (nonatomic, assign) AudioStreamBasicDescription asbd
Declared In
KSYDummyAudioSource.h
nbSample
每次尝试产生的数据长度 (sample数, 默认为1024) 实际每次产生的音频的数据长度不确定, 应该是在nbSample附近波动
@property (nonatomic, assign) int nbSample
Declared In
KSYDummyAudioSource.h