Important: Inside Macintosh: Sound is deprecated as of Mac OS X v10.5. For new audio development in Mac OS X, use Core Audio. See the Audio page in the ADC Reference Library.
SndRecordToFile
You can useSndRecordToFile
to record sound data into a file.
FUNCTION SndRecordToFile (filterProc: ProcPtr; corner: Point; quality: OSType; fRefNum: Integer): OSErr;
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, as described on page 3-28.
fRefNum
- The file reference number of an open file to save the audio data in.
DESCRIPTION
TheSndRecordToFile
function works just likeSndRecord
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'sSndStartFilePlay
function. TheSndRecordToFile
function is always called synchronously.Your application must open the file specified in the
fRefNum
parameter before calling theSndRecordToFile
function. Your application must close the file sometime after callingSndRecordToFile
.SPECIAL CONSIDERATIONS
Because theSndRecordToFile
function moves memory, you should not call it at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSndRecordToFile
function are
Trap macro Selector _SoundDispatch $07080014 RESULT CODES
noErr 0 No error userCanceledErr -128 User canceled the operation siBadSoundInDevice -221 Invalid sound input device siUnknownQuality -232 Unknown quality