TestSessionRecorder
public class TestSessionRecorder
The TestSessionRecorder
class is used to detect and record when a user blows into the Wing sensor.
-
The object that acts as the delegate for the recorder.
Declaration
Swift
public weak var delegate: TestRecorderDelegate?
-
The duration of the recording session.
Declaration
Swift
public let testDuration: TimeInterval = 6.0
-
The threshold that the sensor recording strength must surpass to be considered a valid test.
Declaration
Swift
public let signalStrengthThreshold: Double = 0.6
-
Indicates whether or not the recorded blow has passed the required signal strength threshold to be considered a valid, processable blow.
Declaration
Swift
public fileprivate(set) var signalStrengthThresholdPassed = false
-
The current state of the recorder.
Declaration
Swift
public fileprivate(set) var state: TestRecorderState = .ready
-
The filepath where the recording is saved to.
Declaration
Swift
public var recordingFilepath: String?
-
Initializes an instance of the
TestSessionRecorder
class.Declaration
Swift
public init()
-
Configures the blow detection and audio recorders. Starts the blow detection recorder.
Throws
TestSessionRecorder.Error.configurationFailed if either the blow detection or audio recorders configuration fails.Declaration
Swift
public func configure() throws
-
Starts the recording for a lung function test.
Declaration
Swift
public func startRecording()
-
Ends the recording session.
Declaration
Swift
public func stopRecording()