Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 3 - Sound Input Manager / Sound Input Manager Reference
Sound Input Manager Routines / Recording Sounds Directly From Sound Input Devices


Legacy Documentclose button

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.

SPBGetRecordingStatus

You can use SPBGetRecordingStatus to obtain recording status information about a sound input device.

FUNCTION SPBGetRecordingStatus (inRefNum: LongInt; 
                           VAR recordingStatus: Integer; 
                           VAR meterLevel: Integer; 
                           VAR totalSamplesToRecord: LongInt; 
                           VAR numberOfSamplesRecorded: LongInt; 
                           VAR totalMsecsToRecord: LongInt; 
                           VAR numberOfMsecsRecorded: LongInt):
                           OSErr;
inRefNum
The device reference number of the sound input device, as obtained from the SPBOpenDevice function.
recordingStatus
The status of the recording. While the input device is recording, this parameter is set to a number greater than 0. When a recording terminates without an error, this parameter is set to 0. When an error occurs during recording or the recording has been terminated by a call to the SPBStopRecording function, this parameter is less than 0 and contains an error code.
meterLevel
The current input signal level. This level ranges from 0 to 255.
totalSamplesToRecord
The total number of samples to record, including those samples already recorded.
numberOfSamplesRecorded
The number of samples already recorded.
totalMsecsToRecord
The total duration of recording time, including recording time already elapsed.
numberOfMsecsRecorded
The amount of recording time that has elapsed.
DESCRIPTION
The SPBGetRecordingStatus function returns, in its second through seventh parameters, information about the recording on the device specified by the inRefNum parameter.

SPECIAL CONSIDERATIONS
You can call the SPBGetRecordingStatus function at interrupt time.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the SPBGetRecordingStatus function are
Trap macroSelector
_SoundDispatch$0E340014

RESULT CODES
noErr0No error
siBadSoundInDevice-221Invalid sound input device

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996