ORKAudioRecorder Class Reference

Inherits from ORKRecorder : NSObject
Declared in ORKAudioRecorder.h

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

To ensure audio recording continues when a task enters the background, add the audio tag to UIBackgroundModes in your app’s Info.plist file.

+ defaultRecorderSettings

The default audio format settings.

+ (NSDictionary *)defaultRecorderSettings

Discussion

If no settings are specified, the audio configuration is MPEG4 AAC, 2 channels, 16 bit, 44.1 kHz, AVAudioQualityMin.

Declared In

ORKAudioRecorder.h

  recorderSettings

Audio format settings

@property (nonatomic, copy, readonly) NSDictionary *recorderSettings

Discussion

Settings for the recording session. Passed to AVAudioRecorder's-initWithURL:settings:error:` For information on the settings available for an audio recorder, see “AV Foundation Audio Settings Constants”.

Declared In

ORKAudioRecorder.h

– initWithIdentifier:recorderSettings:step:outputDirectory:

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

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

Parameters

identifier

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

recorderSettings

The settings for the recording session.

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

ORKAudioRecorder.h

  audioRecorder

Reference to the audio recorder being used.

@property (nonatomic, strong, readonly, nullable) AVAudioRecorder *audioRecorder

Discussion

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

Declared In

ORKAudioRecorder.h