|
MusicKit
0.0.0
|
Records the FX audio stream to disk. More...
#import <SndAudioProcessorRecorder.h>
Public Member Functions | |
| (BOOL) | - prepareToRecordWithQueueDuration: |
| Prepares the buffer used for recording. | |
| (BOOL) | - prepareToRecordWithQueueDuration:ofFormat: |
| Prepares the buffer used for recording. | |
| (BOOL) | - isRecording |
| Returns whether the receiver is currently recording. | |
| (BOOL) | - startRecording |
| YES if recording started ok. | |
| (BOOL) | - setUpRecordFile:withFormat: |
| Sets up recording of the file in the given format. | |
| (BOOL) | - startRecordingToFile:withDataFormat:channelCount:samplingRate: |
| Begins recording to the named file in the given format. | |
| (BOOL) | - startRecordingToFile:withFormat: |
| Begins recording to the named file in the given format. | |
| (void) | - stopRecording |
| Stops the recording of the stream to file. | |
| (long) | - framesRecorded |
| Returns the number of frames recorded. | |
| (void) | - setStartTriggerThreshold: |
| Sets the linear amplitude the stream must rise above before recording begins. | |
| (BOOL) | - prepareToRecordWithQueueDuration: |
| Prepares the buffer used for recording. | |
| (BOOL) | - prepareToRecordWithQueueDuration:ofFormat: |
| Prepares the buffer used for recording. | |
| (BOOL) | - isRecording |
| Returns whether the receiver is currently recording. | |
| (BOOL) | - startRecording |
| YES if recording started ok. | |
| (BOOL) | - setUpRecordFile:withFormat: |
| Sets up recording of the file in the given format. | |
| (BOOL) | - startRecordingToFile:withDataFormat:channelCount:samplingRate: |
| Begins recording to the named file in the given format. | |
| (BOOL) | - startRecordingToFile:withFormat: |
| Begins recording to the named file in the given format. | |
| (void) | - stopRecording |
| Stops the recording of the stream to file. | |
| (long) | - framesRecorded |
| Returns the number of frames recorded. | |
| (void) | - setStartTriggerThreshold: |
| Sets the linear amplitude the stream must rise above before recording begins. | |
Protected Attributes | |
| SndAudioBufferQueue * | writingQueue |
| SndFormat | fileFormat |
| BOOL | isRecording |
| NSFileHandle * | writingFileHandle |
| unsigned long | framesRecorded |
| SNDFILE * | recordFile |
| NSString * | recordFileName |
| BOOL | startedRecording |
| float | startTriggerThreshold |
| BOOL | stopSignal |
Records the FX audio stream to disk.
A threshold can be set to prevent silence being recorded prior to the sound. An automatic shutoff after a specifiable period of silence is also possible.
| - (long) framesRecorded |
Returns the number of frames recorded.
| - (long) framesRecorded |
Returns the number of frames recorded.
| - (BOOL) isRecording |
Returns whether the receiver is currently recording.
| - (BOOL) isRecording |
Returns whether the receiver is currently recording.
| - (BOOL) prepareToRecordWithQueueDuration: | (double) | durationOfBuffering |
Prepares the buffer used for recording.
| durationOfBuffering | The duration (in seconds) of the buffering that should used in recording. |
| - (BOOL) prepareToRecordWithQueueDuration: | (double) | durationOfBuffering |
Prepares the buffer used for recording.
| durationOfBuffering | The duration (in seconds) of the buffering that should used in recording. |
| - (BOOL) prepareToRecordWithQueueDuration: | (double) | durationOfBuffering | |
| ofFormat: | (SndFormat) | queueFormat | |
Prepares the buffer used for recording.
| durationOfBuffering | The duration (in seconds) of the buffering that should used in recording. |
| queueFormat | The format of the buffers to be expected. |
| - (BOOL) prepareToRecordWithQueueDuration: | (double) | durationOfBuffering | |
| ofFormat: | (SndFormat) | queueFormat | |
Prepares the buffer used for recording.
| durationOfBuffering | The duration (in seconds) of the buffering that should used in recording. |
| queueFormat | The format of the buffers to be expected. |
| - (void) setStartTriggerThreshold: | (float) | amplitudeThreshold |
Sets the linear amplitude the stream must rise above before recording begins.
To record all samples, including leading silence, set a negative amplitude, i.e -1.0.
| amplitudeThreshold | The amplitude is a normalised value between silence (0.0) and maximum dynamic range (1.0). |
| - (void) setStartTriggerThreshold: | (float) | amplitudeThreshold |
Sets the linear amplitude the stream must rise above before recording begins.
To record all samples, including leading silence, set a negative amplitude, i.e -1.0.
| amplitudeThreshold | The amplitude is a normalised value between silence (0.0) and maximum dynamic range (1.0). |
| - (BOOL) setUpRecordFile: | (NSString *) | filename | |
| withFormat: | (SndFormat) | format | |
Sets up recording of the file in the given format.
This method is not normally called, use startRecordingToFile:withDataFormat:channelCount:samplingRate: instead. This method, setUpRecordFile:withFormat: is defined here in order to facilitate overriding in subclasses.
| filename | path of the file to record to. |
| format | The format of the file. The frameCount field is ignored. |
| - (BOOL) setUpRecordFile: | (NSString *) | filename | |
| withFormat: | (SndFormat) | format | |
Sets up recording of the file in the given format.
This method is not normally called, use startRecordingToFile:withDataFormat:channelCount:samplingRate: instead. This method, setUpRecordFile:withFormat: is defined here in order to facilitate overriding in subclasses.
| filename | path of the file to record to. |
| format | The format of the file. The frameCount field is ignored. |
| - (BOOL) startRecording |
YES if recording started ok.
| - (BOOL) startRecording |
YES if recording started ok.
| - (BOOL) startRecordingToFile: | (NSString *) | filename | |
| withDataFormat: | (SndSampleFormat) | dataFormat | |
| channelCount: | (int) | chanCount | |
| samplingRate: | (int) | sampleRate | |
Begins recording to the named file in the given format.
| filename | path of the file to record to. |
| dataFormat | The data format specifying dynamic range. |
| channelCount | The number of channels to write. |
| sampleRate | The sample rate in Hz. |
| - (BOOL) startRecordingToFile: | (NSString *) | filename | |
| withDataFormat: | (SndSampleFormat) | dataFormat | |
| channelCount: | (int) | chanCount | |
| samplingRate: | (int) | sampleRate | |
Begins recording to the named file in the given format.
| filename | path of the file to record to. |
| dataFormat | The data format specifying dynamic range. |
| channelCount | The number of channels to write. |
| sampleRate | The sample rate in Hz. |
| - (BOOL) startRecordingToFile: | (NSString *) | filename | |
| withFormat: | (SndFormat) | newFileFormat | |
Begins recording to the named file in the given format.
| filename | path of the file to record to. |
| newFileFormat | The file format to write to. The field frameCount should match the audio processor chain. |
| - (BOOL) startRecordingToFile: | (NSString *) | filename | |
| withFormat: | (SndFormat) | newFileFormat | |
Begins recording to the named file in the given format.
| filename | path of the file to record to. |
| newFileFormat | The file format to write to. The field frameCount should match the audio processor chain. |
| - (void) stopRecording |
Stops the recording of the stream to file.
Waits until the queue clears.
| - (void) stopRecording |
Stops the recording of the stream to file.
Waits until the queue clears.
- (SndFormat) fileFormat [protected] |
The format of the data to be stored in the file.
- (unsigned long) framesRecorded [protected] |
Number of sample frames written
- (BOOL) isRecording [protected] |
Indicates if recording is currently active.
- (SNDFILE *) recordFile [protected] |
The libsndfile handle referring to the open file. NULL if not open.
- (NSString *) recordFileName [protected] |
Full pathname of the file being or about to be written.
- (BOOL) startedRecording [protected] |
Indicates if a minimum threshold or time trigger has passed and recording has begun.
- (float) startTriggerThreshold [protected] |
A normalised absolute value threshold to begin the recording of sound.
- (BOOL) stopSignal [protected] |
A boolean variable to indicate that recording should stop and the file should be closed.
- (NSFileHandle *) writingFileHandle [protected] |
Holds the file handle used in writing.
- (SndAudioBufferQueue *) writingQueue [protected] |
A queue of buffers copied from those received by processReplacingInputBuffer: ready for writing.
1.7.6.1