#import <SndFileRecorder.h>

Public Member Functions | |
| (id) | - init |
| Initializor. | |
| (NSString *) | - description |
| Returns a description of the instance. | |
| (BOOL) | - startRecording |
| Start recording. | |
| (BOOL) | - startRecordingToFile: |
| Starts the record-to-disk routines. | |
| (id) | - stopRecording |
| Sets up the record file amd. | |
| (id) | - stopRecordingWait:disconnectFromStream: |
| Sets up the record file amd. | |
| (id) | - init |
| Initialiser. | |
| (NSString *) | - description |
| (BOOL) | - startRecording |
| (BOOL) | - startRecordingToFile: |
| Starts the record-to-disk routines. | |
| (id) | - stopRecording |
| Sets up the record file. | |
| (id) | - stopRecordingWait:disconnectFromStream: |
| Sets up the record file. | |
Protected Attributes | |
| SndAudioProcessorRecorder * | recorder |
Records incoming audio to a sound file.
BIG TODO: general purpose format stuff
Using the client currently requires an explicit connect-to-stream manager call:
SndStreamRecorder *rec = [SndStreamRecorder streamRecorder]; [[SndStreamManager defaultStreamManager] addClient: rec];
then either...
[rec startRecordingToFile: "/tmp/incomingsound.snd"]; (time passes...) [rec stopRecording];
or:
[rec prepareForRecording: 10.5]; //record for 10.5 seonds [rec startRecording];
TODO:
ATTENTION!!! Presumptions made to get this class off the ground quickly: The incoming stream is made of 32-bit floats, and the saved file is made of 16-bit ints!
BIG TODO: general purpose format stuff
Using the client currently requires an explicit connect-to-stream manager call:
SndStreamRecorder *rec = [SndStreamRecorder streamRecorder]; [[SndStreamManager defaultStreamManager] addClient: rec];
then either...
[rec startRecordingToFile: "/tmp/incomingsound.snd"]; (time passes...) [rec stopRecording];
or:
[rec prepareForRecording: 10.5]; //record for 10.5 seonds [rec startRecording];
TODO:
| - (id) init |
Initializor.
| - (NSString *) description |
Returns a description of the instance.
Reimplemented from SndStreamClient.
| - (BOOL) startRecording |
Start recording.
| - (BOOL) startRecordingToFile: | (NSString *) | filename |
Starts the record-to-disk routines.
| filename |
| - (id) stopRecording |
Sets up the record file amd.
For internal use - you shouldn't have to call this.
| - (id) stopRecordingWait: | (BOOL) | bWait | ||
| disconnectFromStream: | (BOOL) | bDisconnectFromStream | ||
Sets up the record file amd.
For internal use - you shouldn't have to call this.
| bWait | TRUE if the recorder should wait for intermediate buffers to be flushed to disk. |
| bDisconnectFromStream | TRUE if you want the client to disconnect from the stream manager, FALSE otherwise. Leaving the client connected ensures the audio streams stay open, and minimizes start-recording set-up time. Downside is a slight CPU hit from the background streaming going on. |
| - (id) init |
Initialiser.
| - (NSString*) description |
| - (BOOL) startRecording |
| - (BOOL) startRecordingToFile: | (NSString *) | filename |
Starts the record-to-disk routines.
| filename |
| - (id) stopRecording |
Sets up the record file.
For internal use - you shouldn't have to call this.
| - (id) stopRecordingWait: | (BOOL) | bWait | ||
| disconnectFromStream: | (BOOL) | bDisconnectFromStream | ||
Sets up the record file.
For internal use - you shouldn't have to call this.
| bWait | TRUE if the recorder should wait for intermediate buffers to be flushed to disk. FALSE if you want immediate cessation of recording. | |
| bDisconnectFromStream | TRUE if you want the client to disconnect from the stream manager, FALSE otherwise. Leaving the client connected ensures the audio streams stay open, and minimizes start-recording set-up time. Downside is a slight CPU hit from the background streaming going on. |
- (SndAudioProcessorRecorder *) recorder [protected] |
A stream recording FX processor
1.5.6