init(buffer:bufferStartTime:)
Creates an audio input object for audio that may be discontiguous with previous input.
Declaration
init(buffer: AVAudioPCMBuffer, bufferStartTime: CMTime?)Parameters
- buffer:
An audio buffer.
- bufferStartTime:
The time-code of the start of the audio buffer. If
nil, this audio buffer is assumed to start immediately after the previous buffer (or at time-code zero if there is no previous buffer). TheCMTimecan have a different timescale than the sample rate of the audio data.
Discussion
The audio buffer must not overlap or precede other audio input, as determined by the bufferStartTime value.