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 useSPBGetRecordingStatus
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
TheSPBGetRecordingStatus
function returns, in its second through seventh parameters, information about the recording on the device specified by theinRefNum
parameter.SPECIAL CONSIDERATIONS
You can call theSPBGetRecordingStatus
function at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSPBGetRecordingStatus
function are
Trap macro Selector _SoundDispatch $0E340014 RESULT CODES
noErr 0 No error siBadSoundInDevice -221 Invalid sound input device