SndStreamRecorder Class Reference

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! More...

#import <SndFileRecorder.h>

Inheritance diagram for SndStreamRecorder:

SndStreamClient SndStreamClient

List of all members.

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

SndAudioProcessorRecorderrecorder


Detailed Description

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!

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:


Member Function Documentation

- (id) init  

Initializor.

Returns:
self

- (NSString *) description  

Returns a description of the instance.

Returns:
NSString with description

Reimplemented from SndStreamClient.

- (BOOL) startRecording  

Start recording.

Returns:
Boolean indicating success

- (BOOL) startRecordingToFile: (NSString *)  filename  

Starts the record-to-disk routines.

Parameters:
filename 
Returns:
Boolean indicating success

- (id) stopRecording  

Sets up the record file amd.

For internal use - you shouldn't have to call this.

Returns:
Boolean indicating success

- (id) stopRecordingWait: (BOOL)  bWait
disconnectFromStream: (BOOL)  bDisconnectFromStream 

Sets up the record file amd.

For internal use - you shouldn't have to call this.

Parameters:
bWait TRUE if the recorder should wait for intermediate buffers to be flushed to disk.
FALSE if you want immediate cessation of recording.
Parameters:
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.
Returns:
Boolean indicating success

- (id) init  

Initialiser.

Returns:
self

- (NSString*) description  

Returns:
NSString with description

Reimplemented from SndStreamClient.

- (BOOL) startRecording  

Returns:
Boolean indicating success

- (BOOL) startRecordingToFile: (NSString *)  filename  

Starts the record-to-disk routines.

Parameters:
filename 
Returns:
Boolean indicating success

- (id) stopRecording  

Sets up the record file.

For internal use - you shouldn't have to call this.

Returns:
Boolean indicating success

- (id) stopRecordingWait: (BOOL)  bWait
disconnectFromStream: (BOOL)  bDisconnectFromStream 

Sets up the record file.

For internal use - you shouldn't have to call this.

Parameters:
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.
Returns:
Boolean indicating success


Member Data Documentation

A stream recording FX processor


The documentation for this class was generated from the following files:

Generated on Sat Dec 5 17:01:17 2009 for MusicKit by  doxygen 1.5.6