ORKStreamingAudioRecorder Class Reference

Inherits from ORKRecorder : NSObject
Declared in ORKStreamingAudioRecorder.h
ORKStreamingAudioRecorder.m

Overview

The ORKStreamingAudioRecorder class represents a recorder that uses the app’s AVAudioSession object to record audio.

To audio recording will be discontinued if task enters the background.

Other Methods

– initWithIdentifier:step:outputDirectory:

Returns an initialized audio recorder using the specified step, and output directory.

- (instancetype)initWithIdentifier:(NSString *)identifier step:(ORKStep *)step outputDirectory:(NSURL *)outputDirectory

Parameters

identifier

The unique identifier of the recorder (assigned by the recorder configuration).

step

The step that requested this recorder.

outputDirectory

The directory in which the audio output should be stored.

Return Value

An initialized audio recorder.

Declared In

ORKStreamingAudioRecorder.h

– start

Starts data recording.

- (void)start

Discussion

If an error occurs when recording starts, it is returned through the delegate.

Declared In

ORKRecorder.h

– stop

Stops data recording, which generally triggers the return of results.

- (void)stop

Discussion

If an error occurs when stopping the recorder, it is returned through the delegate. Subclasses should call finishRecordingWithError: rather than calling super.

Declared In

ORKRecorder.h

– isRecording

A Boolean value indicating whether the recorder is currently recording.

- (BOOL)isRecording

Return Value

YES if the recorder is recording; otherwise, NO.

Declared In

ORKRecorder.h

– finishRecordingWithError:

Indicates that recording has failed; stop recording and report the error to the delegate

- (void)finishRecordingWithError:(NSError *)error

Parameters

error

Error that occurred.

Declared In

ORKRecorder_Private.h

Other Methods

  audioEngine

Reference to the audio recorder being used.

@property (nonatomic, strong, readonly, nullable) AVAudioEngine *audioEngine

Discussion

The value of this property is used in the audio task in order to display recorded volume and metering in real time during the task.

Declared In

ORKStreamingAudioRecorder.h