MusicKit
0.0.0
|
Records incoming audio to a sound file. More...
#import <SndStreamRecorder.h>
Public Member Functions | |
(id) | - init |
Initialiser. | |
(NSString *) | - description |
(BOOL) | - startRecording |
(BOOL) | - startRecordingToFile: |
Starts the record-to-disk routines. | |
(void) | - stopRecording |
Stops the recording to file. | |
(void) | - stopRecordingAndDisconnectFromStream: |
Stops the recording to file. Optionally stay connected to the stream. | |
(id) | - init |
Initialiser. | |
(NSString *) | - description |
(BOOL) | - startRecording |
(BOOL) | - startRecordingToFile: |
Starts the record-to-disk routines. | |
(void) | - stopRecording |
Stops the recording to file. | |
(void) | - stopRecordingAndDisconnectFromStream: |
Stops the recording to file. Optionally stay connected to the stream. | |
Protected Attributes | |
SndAudioProcessorRecorder * | recorder |
Records incoming audio to a sound file.
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:
- (NSString*) description |
Reimplemented from SndStreamClient.
- (NSString*) description |
Reimplemented from SndStreamClient.
- (id) init |
Initialiser.
- (id) init |
Initialiser.
- (BOOL) startRecording |
- (BOOL) startRecording |
- (BOOL) startRecordingToFile: | (NSString *) | filename |
Starts the record-to-disk routines.
filename |
- (BOOL) startRecordingToFile: | (NSString *) | filename |
Starts the record-to-disk routines.
filename |
- (void) stopRecording |
Stops the recording to file.
The recorder instance will wait for intermediate buffers to be flushed to disk. The recorder will then disconnect from the stream.
- (void) stopRecording |
Stops the recording to file.
The recorder instance will wait for intermediate buffers to be flushed to disk. The recorder will then disconnect from the stream.
- (void) stopRecordingAndDisconnectFromStream: | (BOOL) | bDisconnectFromStream |
Stops the recording to file. Optionally stay connected to the stream.
For internal use only.
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. |
- (void) stopRecordingAndDisconnectFromStream: | (BOOL) | bDisconnectFromStream |
Stops the recording to file. Optionally stay connected to the stream.
For internal use only.
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