MicInputProvider
public class MicInputProvider
Record audio input from a microphone.
-
Whether the microphone is currently running.
Declaration
Swift
public var isRunning: Bool { get } -
The format of the PCM audio to be contained in the buffer.
Declaration
Swift
public var audioFormat: AVAudioFormat? -
Creates an instance of an MicInputProvider.
Declaration
Swift
public init(inputFormat: AVAudioFormat? = nil)Parameters
inputFormatThe format of the PCM audio to be contained in the buffer.
-
Starts recording from the microphone.
Throws
An error of typeMicInputErrorDeclaration
Swift
public func start(tapBlock: @escaping AVAudioNodeTapBlock) throwsParameters
tapBlocka block to be called with audio buffers
-
Starts recording from the microphone.
Audio buffers are passed through
MicInputProviderDelegate.micInputProviderDidReceive(buffer:).Throws
An error of typeMicInputErrorDeclaration
Swift
public func start() throws -
Stops recording from the microphone.
Declaration
Swift
public func stop()
View on GitHub
MicInputProvider Class Reference