开发者

core audio callback, inTimeStamp at the beginning or end of recording

开发者 https://www.devze.com 2023-03-01 17:44 出处:网络
In core audio, when the recordingCallback is called: static OSStatus recordingCallback(void *inRefCon,

In core audio, when the recordingCallback is called:

static OSStatus recordingCallback(void *inRefCon, 
                              AudioUnitRenderActionFlags *ioActionFlags, 
                              const AudioTimeStamp *inTim开发者_StackOverflow中文版eStamp, 
                              UInt32 inBusNumber, 
                              UInt32 inNumberFrames, 
                              AudioBufferList *ioData) {

does inTimeStamp reference the time when the audio began to be received or the time when the audio was finished being received.

was it

X if X is equal to the time when recording began

or

X + the buffer length

thank you,

nonono


The timestamp is for the time when the buffer was captured, specifically the bus time of the system (see this thread on the CoreAudio mailing list for details). So it would refer to the time in the first sample of the buffer, not the last sample.

0

精彩评论

暂无评论...
验证码 换一张
取 消