A protocol for capturing audio data from input sources (microphones).
public protocol AudioRecorderProtocol
An audio recorder is supposed to capture audio data from a microphone with a pre-configured sample rate and channel count. It should also provide the functionality for starting and stopping the capture as well as preparing the recorder and resetting it to default state
The data, errors and events should be dispatched to the delegate.
The delegate that will receive the data, errors and events from the recorder.
var delegate: AudioRecorderDelegate?
The sample rate used for recording.
var sampleRate: Double
The amount of channels captured by the recorder.
var channels: UInt32
Starts the recorder.
func start() throws
Starts the recorder.
func stop()
Suspends the recorder, telling it to release any resources.
func suspend() throws
Resumes the recorder, re-initialising any resources needed for audio capture.
func resume() throws