Recorder utility, used for recording live audio to disk.
More...
#import <AERecorder.h>
Inherits <NSObject>, and <AEAudioReceiver>.
Recorder utility, used for recording live audio to disk.
This can be used to record just the microphone input, or the output of the audio system, just one channel, or a combination of all three. Simply add an instance of this class as an audio receiver for the particular audio you wish to record, using AEAudioController's addInputReceiver:, addOutputReceiver:, forChannel:addOutputReceiver:forChannel:, etc, and all streams will be mixed together and recorded.
See the sample app for a demonstration.
+ (BOOL) AACEncodingAvailable |
|
|
|
Determine whether AAC encoding is possible on this device.
Initialise.
- Parameters
-
audioController | The Audio Controller |
- (BOOL) beginRecordingToFileAtPath: |
|
(NSString *) |
path |
fileType: |
|
(AudioFileTypeID) |
fileType |
error: |
|
(NSError **) |
error |
|
|
| |
Prepare and begin recording.
Prepare to record, then start recording immediately, without needing to call AERecorderStartRecording
- Parameters
-
path | The path to record to |
fileType | The kind of file to create |
error | The error, if not NULL and if an error occurs |
- Returns
- YES on success, NO on failure.
- (BOOL) beginRecordingToFileAtPath: |
|
(NSString *) |
path |
fileType: |
|
(AudioFileTypeID) |
fileType |
bitDepth: |
|
(UInt32) |
bits |
error: |
|
(NSError **) |
error |
|
|
| |
- (BOOL) beginRecordingToFileAtPath: |
|
(NSString *) |
path |
fileType: |
|
(AudioFileTypeID) |
fileType |
bitDepth: |
|
(UInt32) |
bits |
channels: |
|
(UInt32) |
channels |
error: |
|
(NSError **) |
error |
|
|
| |
- (BOOL) prepareRecordingToFileAtPath: |
|
(NSString *) |
path |
fileType: |
|
(AudioFileTypeID) |
fileType |
error: |
|
(NSError **) |
error |
|
|
| |
Prepare to record.
Prepare recording and set up internal data structures. When this method returns, the recorder is ready to record.
Start recording by calling AERecorderStartRecording. This allows you to record synchronously with other audio events.
- Parameters
-
path | The path to record to |
fileType | The kind of file to create |
error | The error, if not NULL and if an error occurs |
- Returns
- YES on success, NO on failure.
- (BOOL) prepareRecordingToFileAtPath: |
|
(NSString *) |
path |
fileType: |
|
(AudioFileTypeID) |
fileType |
bitDepth: |
|
(UInt32) |
bits |
error: |
|
(NSError **) |
error |
|
|
| |
- (BOOL) prepareRecordingToFileAtPath: |
|
(NSString *) |
path |
fileType: |
|
(AudioFileTypeID) |
fileType |
bitDepth: |
|
(UInt32) |
bits |
channels: |
|
(UInt32) |
channels |
error: |
|
(NSError **) |
error |
|
|
| |
- (void) AERecorderStartRecording |
|
(AERecorder *) |
recorder |
|
- (void) AERecorderStopRecording |
|
(AERecorder *) |
recorder |
|
Stop recording.
Will stop from recording more data to file. This does not close or flush the file, it only stops any incoming audio from being written. You can later call finishRecording, or call AERecorderStartRecording to continue recording.
This is thread-safe and can be used from the audio thread.
- Parameters
-
Finish recording and close file.
Current recorded time in seconds.
Current state of the recorder.
The documentation for this class was generated from the following file: