Carbon


SndRecordToFile

Header: Sound.h Carbon status: Unsupported

Records sound data into a file.

OSErr SndRecordToFile (
    ModalFilterUPP filterProc, 
    Point corner, 
    OSType quality, 
    SInt16 fRefNum
);
Parameter descriptions
filterProc

A pointer to a function that determines how user actions in the sound recording dialog box are filtered.

corner

The horizontal and vertical coordinates of the upper-left corner of the sound recording dialog box (in global coordinates).

quality

The desired quality of the recorded sound.

fRefNum

The file reference number of an open file to save the audio data in.

function result

A result code.

DISCUSSION

The SndRecordToFile function works just like SndRecord except that it stores the sound input data into a file. The resulting file is in either AIFF or AIFF-C format and contains the information necessary to play the file by using the Sound Manager’s SndStartFilePlay function. The SndRecordToFile function is always called synchronously.

Your application must open the file specified in the fRefNum parameter before calling the SndRecordToFile function. Your application must close the file sometime after calling SndRecordToFile.

This input function is analogous to the Sound Manager function SndStartFilePlay. By using this high-level function, you can be assured that your application presents a user interface that is consistent with that displayed by other applications doing sound input. SndRecordToFile attempts to record sound data from the sound input hardware currently selected in the Sound In control panel.

SPECIAL CONSIDERATIONS

Because the SndRecordToFile function moves memory, you should not call it at interrupt time.

AVAILABILITY

Not supported in Carbon. Not available in Carbon.

CARBON NOTES

QuickTime provides a more flexible means of recording sound files.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)